AWS SDK

AWS SDK

rev. a25ccedd311e7562a03a1cd07d728cef10c9474c (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/glacier/src/protocol_serde/shape_upload_archive.rs

@@ -110,110 +161,165 @@
  130    130   
        output.build()
  131    131   
    })
  132    132   
}
  133    133   
  134    134   
pub fn ser_upload_archive_headers(
  135    135   
    input: &crate::operation::upload_archive::UploadArchiveInput,
  136    136   
    mut builder: ::http::request::Builder,
  137    137   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  138    138   
    if let ::std::option::Option::Some(inner_1) = &input.archive_description {
  139    139   
        let formatted_2 = inner_1.as_str();
         140  +
        if !formatted_2.is_empty() {
  140    141   
            let header_value = formatted_2;
  141    142   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  142    143   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  143    144   
                    "archive_description",
  144    145   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  145    146   
                )
  146    147   
            })?;
  147    148   
            builder = builder.header("x-amz-archive-description", header_value);
  148    149   
        }
         150  +
    }
  149    151   
    if let ::std::option::Option::Some(inner_3) = &input.checksum {
  150    152   
        let formatted_4 = inner_3.as_str();
         153  +
        if !formatted_4.is_empty() {
  151    154   
            let header_value = formatted_4;
  152    155   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  153    156   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  154    157   
                    "checksum",
  155    158   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  156    159   
                )
  157    160   
            })?;
  158    161   
            builder = builder.header("x-amz-sha256-tree-hash", header_value);
  159    162   
        }
         163  +
    }
  160    164   
    Ok(builder)
  161    165   
}

tmp-codegen-diff/aws-sdk/sdk/glacier/src/protocol_serde/shape_upload_multipart_part.rs

@@ -109,109 +160,164 @@
  129    129   
        output.build()
  130    130   
    })
  131    131   
}
  132    132   
  133    133   
pub fn ser_upload_multipart_part_headers(
  134    134   
    input: &crate::operation::upload_multipart_part::UploadMultipartPartInput,
  135    135   
    mut builder: ::http::request::Builder,
  136    136   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  137    137   
    if let ::std::option::Option::Some(inner_1) = &input.checksum {
  138    138   
        let formatted_2 = inner_1.as_str();
         139  +
        if !formatted_2.is_empty() {
  139    140   
            let header_value = formatted_2;
  140    141   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  141    142   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  142    143   
                    "checksum",
  143    144   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  144    145   
                )
  145    146   
            })?;
  146    147   
            builder = builder.header("x-amz-sha256-tree-hash", header_value);
  147    148   
        }
         149  +
    }
  148    150   
    if let ::std::option::Option::Some(inner_3) = &input.range {
  149    151   
        let formatted_4 = inner_3.as_str();
         152  +
        if !formatted_4.is_empty() {
  150    153   
            let header_value = formatted_4;
  151    154   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  152    155   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  153    156   
                    "range",
  154    157   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  155    158   
                )
  156    159   
            })?;
  157    160   
            builder = builder.header("Content-Range", header_value);
  158    161   
        }
         162  +
    }
  159    163   
    Ok(builder)
  160    164   
}

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

@@ -46,46 +106,106 @@
   66     66   
[dependencies.once_cell]
   67     67   
version = "1.16"
   68     68   
   69     69   
[dependencies.regex-lite]
   70     70   
version = "0.1.5"
   71     71   
   72     72   
[dependencies.tracing]
   73     73   
version = "0.1"
   74     74   
[dev-dependencies.aws-config]
   75     75   
path = "../aws-config"
   76         -
version = "1.5.9"
          76  +
version = "1.5.8"
   77     77   
   78     78   
[dev-dependencies.aws-credential-types]
   79     79   
path = "../aws-credential-types"
   80     80   
features = ["test-util"]
   81     81   
version = "1.2.1"
   82     82   
   83     83   
[dev-dependencies.aws-runtime]
   84     84   
path = "../aws-runtime"
   85     85   
features = ["test-util"]
   86     86   
version = "1.4.3"

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

@@ -41,41 +101,101 @@
   61     61   
[dependencies.once_cell]
   62     62   
version = "1.16"
   63     63   
   64     64   
[dependencies.regex-lite]
   65     65   
version = "0.1.5"
   66     66   
   67     67   
[dependencies.tracing]
   68     68   
version = "0.1"
   69     69   
[dev-dependencies.aws-config]
   70     70   
path = "../aws-config"
   71         -
version = "1.5.9"
          71  +
version = "1.5.8"
   72     72   
   73     73   
[dev-dependencies.aws-credential-types]
   74     74   
path = "../aws-credential-types"
   75     75   
features = ["test-util"]
   76     76   
version = "1.2.1"
   77     77   
   78     78   
[dev-dependencies.aws-runtime]
   79     79   
path = "../aws-runtime"
   80     80   
features = ["test-util"]
   81     81   
version = "1.4.3"

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

@@ -47,47 +107,107 @@
   67     67   
[dependencies.once_cell]
   68     68   
version = "1.16"
   69     69   
   70     70   
[dependencies.regex-lite]
   71     71   
version = "0.1.5"
   72     72   
   73     73   
[dependencies.tracing]
   74     74   
version = "0.1"
   75     75   
[dev-dependencies.aws-config]
   76     76   
path = "../aws-config"
   77         -
version = "1.5.9"
          77  +
version = "1.5.8"
   78     78   
   79     79   
[dev-dependencies.aws-credential-types]
   80     80   
path = "../aws-credential-types"
   81     81   
features = ["test-util"]
   82     82   
version = "1.2.1"
   83     83   
   84     84   
[dev-dependencies.aws-runtime]
   85     85   
path = "../aws-runtime"
   86     86   
features = ["test-util"]
   87     87   
version = "1.4.3"

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_invoke.rs

@@ -502,502 +564,570 @@
  522    522   
        output.build()
  523    523   
    })
  524    524   
}
  525    525   
  526    526   
pub fn ser_invoke_headers(
  527    527   
    input: &crate::operation::invoke::InvokeInput,
  528    528   
    mut builder: ::http::request::Builder,
  529    529   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  530    530   
    if let ::std::option::Option::Some(inner_1) = &input.invocation_type {
  531    531   
        let formatted_2 = inner_1.as_str();
         532  +
        if !formatted_2.is_empty() {
  532    533   
            let header_value = formatted_2;
  533    534   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  534    535   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  535    536   
                    "invocation_type",
  536    537   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  537    538   
                )
  538    539   
            })?;
  539    540   
            builder = builder.header("X-Amz-Invocation-Type", header_value);
  540    541   
        }
         542  +
    }
  541    543   
    if let ::std::option::Option::Some(inner_3) = &input.log_type {
  542    544   
        let formatted_4 = inner_3.as_str();
         545  +
        if !formatted_4.is_empty() {
  543    546   
            let header_value = formatted_4;
  544    547   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  545    548   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  546    549   
                    "log_type",
  547    550   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  548    551   
                )
  549    552   
            })?;
  550    553   
            builder = builder.header("X-Amz-Log-Type", header_value);
  551    554   
        }
         555  +
    }
  552    556   
    if let ::std::option::Option::Some(inner_5) = &input.client_context {
  553    557   
        let formatted_6 = inner_5.as_str();
         558  +
        if !formatted_6.is_empty() {
  554    559   
            let header_value = formatted_6;
  555    560   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  556    561   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  557    562   
                    "client_context",
  558    563   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  559    564   
                )
  560    565   
            })?;
  561    566   
            builder = builder.header("X-Amz-Client-Context", header_value);
  562    567   
        }
         568  +
    }
  563    569   
    Ok(builder)
  564    570   
}

tmp-codegen-diff/aws-sdk/sdk/lambda/src/protocol_serde/shape_invoke_with_response_stream.rs

@@ -539,539 +601,607 @@
  559    559   
        _ => crate::operation::invoke_with_response_stream::InvokeWithResponseStreamError::generic(generic),
  560    560   
    })
  561    561   
}
  562    562   
  563    563   
pub fn ser_invoke_with_response_stream_headers(
  564    564   
    input: &crate::operation::invoke_with_response_stream::InvokeWithResponseStreamInput,
  565    565   
    mut builder: ::http::request::Builder,
  566    566   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  567    567   
    if let ::std::option::Option::Some(inner_1) = &input.invocation_type {
  568    568   
        let formatted_2 = inner_1.as_str();
         569  +
        if !formatted_2.is_empty() {
  569    570   
            let header_value = formatted_2;
  570    571   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  571    572   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  572    573   
                    "invocation_type",
  573    574   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  574    575   
                )
  575    576   
            })?;
  576    577   
            builder = builder.header("X-Amz-Invocation-Type", header_value);
  577    578   
        }
         579  +
    }
  578    580   
    if let ::std::option::Option::Some(inner_3) = &input.log_type {
  579    581   
        let formatted_4 = inner_3.as_str();
         582  +
        if !formatted_4.is_empty() {
  580    583   
            let header_value = formatted_4;
  581    584   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  582    585   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  583    586   
                    "log_type",
  584    587   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  585    588   
                )
  586    589   
            })?;
  587    590   
            builder = builder.header("X-Amz-Log-Type", header_value);
  588    591   
        }
         592  +
    }
  589    593   
    if let ::std::option::Option::Some(inner_5) = &input.client_context {
  590    594   
        let formatted_6 = inner_5.as_str();
         595  +
        if !formatted_6.is_empty() {
  591    596   
            let header_value = formatted_6;
  592    597   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  593    598   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  594    599   
                    "client_context",
  595    600   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  596    601   
                )
  597    602   
            })?;
  598    603   
            builder = builder.header("X-Amz-Client-Context", header_value);
  599    604   
        }
         605  +
    }
  600    606   
    Ok(builder)
  601    607   
}

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

@@ -1,1 +115,115 @@
   17     17   
[dependencies.aws-credential-types]
   18     18   
path = "../aws-credential-types"
   19     19   
version = "1.2.1"
   20     20   
   21     21   
[dependencies.aws-runtime]
   22     22   
path = "../aws-runtime"
   23     23   
version = "1.4.3"
   24     24   
   25     25   
[dependencies.aws-sigv4]
   26     26   
path = "../aws-sigv4"
   27         -
version = "1.2.5"
          27  +
version = "1.2.4"
   28     28   
   29     29   
[dependencies.aws-smithy-async]
   30     30   
path = "../aws-smithy-async"
   31     31   
version = "1.2.1"
   32     32   
   33     33   
[dependencies.aws-smithy-http]
   34     34   
path = "../aws-smithy-http"
   35     35   
version = "0.60.11"
   36     36   
   37     37   
[dependencies.aws-smithy-json]
   38     38   
path = "../aws-smithy-json"
   39     39   
version = "0.60.7"
   40     40   
   41     41   
[dependencies.aws-smithy-runtime]
   42     42   
path = "../aws-smithy-runtime"
   43     43   
features = ["client"]
   44     44   
version = "1.7.3"
   45     45   
   46     46   
[dependencies.aws-smithy-runtime-api]
   47     47   
path = "../aws-smithy-runtime-api"
   48     48   
features = ["client", "http-02x"]
   49     49   
version = "1.7.2"
   50     50   
   51     51   
[dependencies.aws-smithy-types]
   52     52   
path = "../aws-smithy-types"
   53     53   
version = "1.2.8"
   54     54   
   55     55   
[dependencies.aws-types]
   56     56   
path = "../aws-types"
   57     57   
version = "1.3.3"
   58     58   
   59     59   
[dependencies.bytes]
   60     60   
version = "1.4.0"
   61     61   
   62     62   
[dependencies.http]
   63     63   
version = "0.2.9"
   64     64   
   65     65   
[dependencies.http-1x]
   66     66   
version = "1"
   67     67   
optional = true
   68     68   
package = "http"
   69     69   
   70     70   
[dependencies.http-body-1x]
   71     71   
version = "1"
   72     72   
optional = true
   73     73   
package = "http-body"
   74     74   
   75     75   
[dependencies.once_cell]
   76     76   
version = "1.16"
   77     77   
   78     78   
[dependencies.regex-lite]
   79     79   
version = "0.1.5"
   80     80   
   81     81   
[dependencies.tracing]
   82     82   
version = "0.1"
   83     83   
[dev-dependencies.aws-config]
   84     84   
path = "../aws-config"
   85         -
version = "1.5.9"
          85  +
version = "1.5.8"
   86     86   
   87     87   
[dev-dependencies.aws-credential-types]
   88     88   
path = "../aws-credential-types"
   89     89   
features = ["test-util"]
   90     90   
version = "1.2.1"
   91     91   
   92     92   
[dev-dependencies.aws-runtime]
   93     93   
path = "../aws-runtime"
   94     94   
features = ["test-util"]
   95     95   
version = "1.4.3"

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

@@ -41,41 +101,101 @@
   61     61   
[dependencies.once_cell]
   62     62   
version = "1.16"
   63     63   
   64     64   
[dependencies.regex-lite]
   65     65   
version = "0.1.5"
   66     66   
   67     67   
[dependencies.tracing]
   68     68   
version = "0.1"
   69     69   
[dev-dependencies.aws-config]
   70     70   
path = "../aws-config"
   71         -
version = "1.5.9"
          71  +
version = "1.5.8"
   72     72   
   73     73   
[dev-dependencies.aws-credential-types]
   74     74   
path = "../aws-credential-types"
   75     75   
features = ["test-util"]
   76     76   
version = "1.2.1"
   77     77   
   78     78   
[dev-dependencies.aws-runtime]
   79     79   
path = "../aws-runtime"
   80     80   
features = ["test-util"]
   81     81   
version = "1.4.3"

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

@@ -42,42 +100,100 @@
   62     62   
[dependencies.once_cell]
   63     63   
version = "1.16"
   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         -
version = "1.5.9"
          72  +
version = "1.5.8"
   73     73   
   74     74   
[dev-dependencies.aws-credential-types]
   75     75   
path = "../aws-credential-types"
   76     76   
features = ["test-util"]
   77     77   
version = "1.2.1"
   78     78   
   79     79   
[dev-dependencies.aws-smithy-runtime]
   80     80   
path = "../aws-smithy-runtime"
   81     81   
features = ["client", "test-util"]
   82     82   
version = "1.7.3"

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

@@ -1,1 +66,66 @@
   18     18   
path = "../aws-credential-types"
   19     19   
version = "1.2.1"
   20     20   
   21     21   
[dependencies.aws-runtime]
   22     22   
path = "../aws-runtime"
   23     23   
features = ["event-stream", "http-02x"]
   24     24   
version = "1.4.3"
   25     25   
   26     26   
[dependencies.aws-sigv4]
   27     27   
path = "../aws-sigv4"
   28         -
version = "1.2.5"
          28  +
version = "1.2.4"
   29     29   
   30     30   
[dependencies.aws-smithy-async]
   31     31   
path = "../aws-smithy-async"
   32     32   
version = "1.2.1"
   33     33   
   34     34   
[dependencies.aws-smithy-checksums]
   35     35   
path = "../aws-smithy-checksums"
   36         -
version = "0.60.13"
          36  +
version = "0.60.12"
   37     37   
   38     38   
[dependencies.aws-smithy-eventstream]
   39     39   
path = "../aws-smithy-eventstream"
   40     40   
version = "0.60.5"
   41     41   
   42     42   
[dependencies.aws-smithy-http]
   43     43   
path = "../aws-smithy-http"
   44     44   
features = ["event-stream"]
   45     45   
version = "0.60.11"
   46     46   
@@ -97,97 +157,157 @@
  117    117   
version = "0.1"
  118    118   
  119    119   
[dependencies.url]
  120    120   
version = "2.3.1"
  121    121   
[dev-dependencies.async-std]
  122    122   
version = "1.12.0"
  123    123   
  124    124   
[dev-dependencies.aws-config]
  125    125   
path = "../aws-config"
  126    126   
features = ["behavior-version-latest"]
  127         -
version = "1.5.9"
         127  +
version = "1.5.8"
  128    128   
  129    129   
[dev-dependencies.aws-credential-types]
  130    130   
path = "../aws-credential-types"
  131    131   
features = ["test-util"]
  132    132   
version = "1.2.1"
  133    133   
  134    134   
[dev-dependencies.aws-runtime]
  135    135   
path = "../aws-runtime"
  136    136   
features = ["test-util"]
  137    137   
version = "1.4.3"

tmp-codegen-diff/aws-sdk/sdk/s3/src/protocol_serde/shape_abort_multipart_upload.rs

@@ -44,44 +95,99 @@
   64     64   
        output.build()
   65     65   
    })
   66     66   
}
   67     67   
   68     68   
pub fn ser_abort_multipart_upload_headers(
   69     69   
    input: &crate::operation::abort_multipart_upload::AbortMultipartUploadInput,
   70     70   
    mut builder: ::http::request::Builder,
   71     71   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   72     72   
    if let ::std::option::Option::Some(inner_1) = &input.request_payer {
   73     73   
        let formatted_2 = inner_1.as_str();
          74  +
        if !formatted_2.is_empty() {
   74     75   
            let header_value = formatted_2;
   75     76   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   76     77   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   77     78   
                    "request_payer",
   78     79   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   79     80   
                )
   80     81   
            })?;
   81     82   
            builder = builder.header("x-amz-request-payer", header_value);
   82     83   
        }
          84  +
    }
   83     85   
    if let ::std::option::Option::Some(inner_3) = &input.expected_bucket_owner {
   84     86   
        let formatted_4 = inner_3.as_str();
          87  +
        if !formatted_4.is_empty() {
   85     88   
            let header_value = formatted_4;
   86     89   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   87     90   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   88     91   
                    "expected_bucket_owner",
   89     92   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   90     93   
                )
   91     94   
            })?;
   92     95   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   93     96   
        }
          97  +
    }
   94     98   
    Ok(builder)
   95     99   
}

tmp-codegen-diff/aws-sdk/sdk/s3/src/protocol_serde/shape_complete_multipart_upload.rs

@@ -60,60 +216,234 @@
   80     80   
        output.build()
   81     81   
    })
   82     82   
}
   83     83   
   84     84   
pub fn ser_complete_multipart_upload_headers(
   85     85   
    input: &crate::operation::complete_multipart_upload::CompleteMultipartUploadInput,
   86     86   
    mut builder: ::http::request::Builder,
   87     87   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   88     88   
    if let ::std::option::Option::Some(inner_1) = &input.checksum_crc32 {
   89     89   
        let formatted_2 = inner_1.as_str();
          90  +
        if !formatted_2.is_empty() {
   90     91   
            let header_value = formatted_2;
   91     92   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   92     93   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   93     94   
                    "checksum_crc32",
   94     95   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   95     96   
                )
   96     97   
            })?;
   97     98   
            builder = builder.header("x-amz-checksum-crc32", header_value);
   98     99   
        }
         100  +
    }
   99    101   
    if let ::std::option::Option::Some(inner_3) = &input.checksum_crc32_c {
  100    102   
        let formatted_4 = inner_3.as_str();
         103  +
        if !formatted_4.is_empty() {
  101    104   
            let header_value = formatted_4;
  102    105   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  103    106   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  104    107   
                    "checksum_crc32_c",
  105    108   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  106    109   
                )
  107    110   
            })?;
  108    111   
            builder = builder.header("x-amz-checksum-crc32c", header_value);
  109    112   
        }
         113  +
    }
  110    114   
    if let ::std::option::Option::Some(inner_5) = &input.checksum_sha1 {
  111    115   
        let formatted_6 = inner_5.as_str();
         116  +
        if !formatted_6.is_empty() {
  112    117   
            let header_value = formatted_6;
  113    118   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  114    119   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  115    120   
                    "checksum_sha1",
  116    121   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  117    122   
                )
  118    123   
            })?;
  119    124   
            builder = builder.header("x-amz-checksum-sha1", header_value);
  120    125   
        }
         126  +
    }
  121    127   
    if let ::std::option::Option::Some(inner_7) = &input.checksum_sha256 {
  122    128   
        let formatted_8 = inner_7.as_str();
         129  +
        if !formatted_8.is_empty() {
  123    130   
            let header_value = formatted_8;
  124    131   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  125    132   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  126    133   
                    "checksum_sha256",
  127    134   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  128    135   
                )
  129    136   
            })?;
  130    137   
            builder = builder.header("x-amz-checksum-sha256", header_value);
  131    138   
        }
         139  +
    }
  132    140   
    if let ::std::option::Option::Some(inner_9) = &input.request_payer {
  133    141   
        let formatted_10 = inner_9.as_str();
         142  +
        if !formatted_10.is_empty() {
  134    143   
            let header_value = formatted_10;
  135    144   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  136    145   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  137    146   
                    "request_payer",
  138    147   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  139    148   
                )
  140    149   
            })?;
  141    150   
            builder = builder.header("x-amz-request-payer", header_value);
  142    151   
        }
         152  +
    }
  143    153   
    if let ::std::option::Option::Some(inner_11) = &input.expected_bucket_owner {
  144    154   
        let formatted_12 = inner_11.as_str();
         155  +
        if !formatted_12.is_empty() {
  145    156   
            let header_value = formatted_12;
  146    157   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  147    158   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  148    159   
                    "expected_bucket_owner",
  149    160   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  150    161   
                )
  151    162   
            })?;
  152    163   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
  153    164   
        }
         165  +
    }
  154    166   
    if let ::std::option::Option::Some(inner_13) = &input.sse_customer_algorithm {
  155    167   
        let formatted_14 = inner_13.as_str();
         168  +
        if !formatted_14.is_empty() {
  156    169   
            let header_value = formatted_14;
  157    170   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  158    171   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  159    172   
                    "sse_customer_algorithm",
  160    173   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  161    174   
                )
  162    175   
            })?;
  163    176   
            builder = builder.header("x-amz-server-side-encryption-customer-algorithm", header_value);
  164    177   
        }
         178  +
    }
  165    179   
    if let ::std::option::Option::Some(inner_15) = &input.sse_customer_key {
  166    180   
        let formatted_16 = inner_15.as_str();
         181  +
        if !formatted_16.is_empty() {
  167    182   
            let header_value = formatted_16;
  168    183   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  169    184   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  170    185   
                    "sse_customer_key",
  171    186   
                    format!("`{}` cannot be used as a header value: {}", &"*** Sensitive Data Redacted ***", err),
  172    187   
                )
  173    188   
            })?;
  174    189   
            builder = builder.header("x-amz-server-side-encryption-customer-key", header_value);
  175    190   
        }
         191  +
    }
  176    192   
    if let ::std::option::Option::Some(inner_17) = &input.sse_customer_key_md5 {
  177    193   
        let formatted_18 = inner_17.as_str();
         194  +
        if !formatted_18.is_empty() {
  178    195   
            let header_value = formatted_18;
  179    196   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  180    197   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  181    198   
                    "sse_customer_key_md5",
  182    199   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  183    200   
                )
  184    201   
            })?;
  185    202   
            builder = builder.header("x-amz-server-side-encryption-customer-key-MD5", header_value);
  186    203   
        }
         204  +
    }
  187    205   
    Ok(builder)
  188    206   
}
  189    207   
  190    208   
#[allow(unused_mut)]
  191    209   
pub fn de_complete_multipart_upload(
  192    210   
    inp: &[u8],
  193    211   
    mut builder: crate::operation::complete_multipart_upload::builders::CompleteMultipartUploadOutputBuilder,
  194    212   
) -> Result<crate::operation::complete_multipart_upload::builders::CompleteMultipartUploadOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
  195    213   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
  196    214   

tmp-codegen-diff/aws-sdk/sdk/s3/src/protocol_serde/shape_copy_object.rs

@@ -97,97 +566,642 @@
  117    117   
        output.build()
  118    118   
    })
  119    119   
}
  120    120   
  121    121   
pub fn ser_copy_object_headers(
  122    122   
    input: &crate::operation::copy_object::CopyObjectInput,
  123    123   
    mut builder: ::http::request::Builder,
  124    124   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  125    125   
    if let ::std::option::Option::Some(inner_1) = &input.acl {
  126    126   
        let formatted_2 = inner_1.as_str();
         127  +
        if !formatted_2.is_empty() {
  127    128   
            let header_value = formatted_2;
  128    129   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  129    130   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  130    131   
                    "acl",
  131    132   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  132    133   
                )
  133    134   
            })?;
  134    135   
            builder = builder.header("x-amz-acl", header_value);
  135    136   
        }
         137  +
    }
  136    138   
    if let ::std::option::Option::Some(inner_3) = &input.cache_control {
  137    139   
        let formatted_4 = inner_3.as_str();
         140  +
        if !formatted_4.is_empty() {
  138    141   
            let header_value = formatted_4;
  139    142   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  140    143   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  141    144   
                    "cache_control",
  142    145   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  143    146   
                )
  144    147   
            })?;
  145    148   
            builder = builder.header("Cache-Control", header_value);
  146    149   
        }
         150  +
    }
  147    151   
    if let ::std::option::Option::Some(inner_5) = &input.checksum_algorithm {
  148    152   
        let formatted_6 = inner_5.as_str();
         153  +
        if !formatted_6.is_empty() {
  149    154   
            let header_value = formatted_6;
  150    155   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  151    156   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  152    157   
                    "checksum_algorithm",
  153    158   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  154    159   
                )
  155    160   
            })?;
  156    161   
            builder = builder.header("x-amz-checksum-algorithm", header_value);
  157    162   
        }
         163  +
    }
  158    164   
    if let ::std::option::Option::Some(inner_7) = &input.content_disposition {
  159    165   
        let formatted_8 = inner_7.as_str();
         166  +
        if !formatted_8.is_empty() {
  160    167   
            let header_value = formatted_8;
  161    168   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  162    169   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  163    170   
                    "content_disposition",
  164    171   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  165    172   
                )
  166    173   
            })?;
  167    174   
            builder = builder.header("Content-Disposition", header_value);
  168    175   
        }
         176  +
    }
  169    177   
    if let ::std::option::Option::Some(inner_9) = &input.content_encoding {
  170    178   
        let formatted_10 = inner_9.as_str();
         179  +
        if !formatted_10.is_empty() {
  171    180   
            let header_value = formatted_10;
  172    181   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  173    182   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  174    183   
                    "content_encoding",
  175    184   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  176    185   
                )
  177    186   
            })?;
  178    187   
            builder = builder.header("Content-Encoding", header_value);
  179    188   
        }
         189  +
    }
  180    190   
    if let ::std::option::Option::Some(inner_11) = &input.content_language {
  181    191   
        let formatted_12 = inner_11.as_str();
         192  +
        if !formatted_12.is_empty() {
  182    193   
            let header_value = formatted_12;
  183    194   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  184    195   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  185    196   
                    "content_language",
  186    197   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  187    198   
                )
  188    199   
            })?;
  189    200   
            builder = builder.header("Content-Language", header_value);
  190    201   
        }
         202  +
    }
  191    203   
    if let ::std::option::Option::Some(inner_13) = &input.content_type {
  192    204   
        let formatted_14 = inner_13.as_str();
         205  +
        if !formatted_14.is_empty() {
  193    206   
            let header_value = formatted_14;
  194    207   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  195    208   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  196    209   
                    "content_type",
  197    210   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  198    211   
                )
  199    212   
            })?;
  200    213   
            builder = builder.header("Content-Type", header_value);
  201    214   
        }
         215  +
    }
  202    216   
    if let ::std::option::Option::Some(inner_15) = &input.copy_source {
  203    217   
        let formatted_16 = inner_15.as_str();
         218  +
        if !formatted_16.is_empty() {
  204    219   
            let header_value = formatted_16;
  205    220   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  206    221   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  207    222   
                    "copy_source",
  208    223   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  209    224   
                )
  210    225   
            })?;
  211    226   
            builder = builder.header("x-amz-copy-source", header_value);
  212    227   
        }
         228  +
    }
  213    229   
    if let ::std::option::Option::Some(inner_17) = &input.copy_source_if_match {
  214    230   
        let formatted_18 = inner_17.as_str();
         231  +
        if !formatted_18.is_empty() {
  215    232   
            let header_value = formatted_18;
  216    233   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  217    234   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  218    235   
                    "copy_source_if_match",
  219    236   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  220    237   
                )
  221    238   
            })?;
  222    239   
            builder = builder.header("x-amz-copy-source-if-match", header_value);
  223    240   
        }
         241  +
    }
  224    242   
    if let ::std::option::Option::Some(inner_19) = &input.copy_source_if_modified_since {
  225    243   
        let formatted_20 = inner_19.fmt(::aws_smithy_types::date_time::Format::HttpDate)?;
         244  +
        if !formatted_20.is_empty() {
  226    245   
            let header_value = formatted_20;
  227    246   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  228    247   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  229    248   
                    "copy_source_if_modified_since",
  230    249   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  231    250   
                )
  232    251   
            })?;
  233    252   
            builder = builder.header("x-amz-copy-source-if-modified-since", header_value);
  234    253   
        }
         254  +
    }
  235    255   
    if let ::std::option::Option::Some(inner_21) = &input.copy_source_if_none_match {
  236    256   
        let formatted_22 = inner_21.as_str();
         257  +
        if !formatted_22.is_empty() {
  237    258   
            let header_value = formatted_22;
  238    259   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  239    260   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  240    261   
                    "copy_source_if_none_match",
  241    262   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  242    263   
                )
  243    264   
            })?;
  244    265   
            builder = builder.header("x-amz-copy-source-if-none-match", header_value);
  245    266   
        }
         267  +
    }
  246    268   
    if let ::std::option::Option::Some(inner_23) = &input.copy_source_if_unmodified_since {
  247    269   
        let formatted_24 = inner_23.fmt(::aws_smithy_types::date_time::Format::HttpDate)?;
         270  +
        if !formatted_24.is_empty() {
  248    271   
            let header_value = formatted_24;
  249    272   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  250    273   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  251    274   
                    "copy_source_if_unmodified_since",
  252    275   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  253    276   
                )
  254    277   
            })?;
  255    278   
            builder = builder.header("x-amz-copy-source-if-unmodified-since", header_value);
  256    279   
        }
         280  +
    }
  257    281   
    if let ::std::option::Option::Some(inner_25) = &input.expires {
  258    282   
        let formatted_26 = inner_25.fmt(::aws_smithy_types::date_time::Format::HttpDate)?;
         283  +
        if !formatted_26.is_empty() {
  259    284   
            let header_value = formatted_26;
  260    285   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  261    286   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  262    287   
                    "expires",
  263    288   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  264    289   
                )
  265    290   
            })?;
  266    291   
            builder = builder.header("Expires", header_value);
  267    292   
        }
         293  +
    }
  268    294   
    if let ::std::option::Option::Some(inner_27) = &input.grant_full_control {
  269    295   
        let formatted_28 = inner_27.as_str();
         296  +
        if !formatted_28.is_empty() {
  270    297   
            let header_value = formatted_28;
  271    298   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  272    299   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  273    300   
                    "grant_full_control",
  274    301   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  275    302   
                )
  276    303   
            })?;
  277    304   
            builder = builder.header("x-amz-grant-full-control", header_value);
  278    305   
        }
         306  +
    }
  279    307   
    if let ::std::option::Option::Some(inner_29) = &input.grant_read {
  280    308   
        let formatted_30 = inner_29.as_str();
         309  +
        if !formatted_30.is_empty() {
  281    310   
            let header_value = formatted_30;
  282    311   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  283    312   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  284    313   
                    "grant_read",
  285    314   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  286    315   
                )
  287    316   
            })?;
  288    317   
            builder = builder.header("x-amz-grant-read", header_value);
  289    318   
        }
         319  +
    }
  290    320   
    if let ::std::option::Option::Some(inner_31) = &input.grant_read_acp {
  291    321   
        let formatted_32 = inner_31.as_str();
         322  +
        if !formatted_32.is_empty() {
  292    323   
            let header_value = formatted_32;
  293    324   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  294    325   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  295    326   
                    "grant_read_acp",
  296    327   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  297    328   
                )
  298    329   
            })?;
  299    330   
            builder = builder.header("x-amz-grant-read-acp", header_value);
  300    331   
        }
         332  +
    }
  301    333   
    if let ::std::option::Option::Some(inner_33) = &input.grant_write_acp {
  302    334   
        let formatted_34 = inner_33.as_str();
         335  +
        if !formatted_34.is_empty() {
  303    336   
            let header_value = formatted_34;
  304    337   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  305    338   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  306    339   
                    "grant_write_acp",
  307    340   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  308    341   
                )
  309    342   
            })?;
  310    343   
            builder = builder.header("x-amz-grant-write-acp", header_value);
  311    344   
        }
         345  +
    }
  312    346   
    if let ::std::option::Option::Some(inner_35) = &input.metadata_directive {
  313    347   
        let formatted_36 = inner_35.as_str();
         348  +
        if !formatted_36.is_empty() {
  314    349   
            let header_value = formatted_36;
  315    350   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  316    351   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  317    352   
                    "metadata_directive",
  318    353   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  319    354   
                )
  320    355   
            })?;
  321    356   
            builder = builder.header("x-amz-metadata-directive", header_value);
  322    357   
        }
         358  +
    }
  323    359   
    if let ::std::option::Option::Some(inner_37) = &input.tagging_directive {
  324    360   
        let formatted_38 = inner_37.as_str();
         361  +
        if !formatted_38.is_empty() {
  325    362   
            let header_value = formatted_38;
  326    363   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  327    364   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  328    365   
                    "tagging_directive",
  329    366   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  330    367   
                )
  331    368   
            })?;
  332    369   
            builder = builder.header("x-amz-tagging-directive", header_value);
  333    370   
        }
         371  +
    }
  334    372   
    if let ::std::option::Option::Some(inner_39) = &input.server_side_encryption {
  335    373   
        let formatted_40 = inner_39.as_str();
         374  +
        if !formatted_40.is_empty() {
  336    375   
            let header_value = formatted_40;
  337    376   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  338    377   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  339    378   
                    "server_side_encryption",
  340    379   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  341    380   
                )
  342    381   
            })?;
  343    382   
            builder = builder.header("x-amz-server-side-encryption", header_value);
  344    383   
        }
         384  +
    }
  345    385   
    if let ::std::option::Option::Some(inner_41) = &input.storage_class {
  346    386   
        let formatted_42 = inner_41.as_str();
         387  +
        if !formatted_42.is_empty() {
  347    388   
            let header_value = formatted_42;
  348    389   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  349    390   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  350    391   
                    "storage_class",
  351    392   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  352    393   
                )
  353    394   
            })?;
  354    395   
            builder = builder.header("x-amz-storage-class", header_value);
  355    396   
        }
         397  +
    }
  356    398   
    if let ::std::option::Option::Some(inner_43) = &input.website_redirect_location {
  357    399   
        let formatted_44 = inner_43.as_str();
         400  +
        if !formatted_44.is_empty() {
  358    401   
            let header_value = formatted_44;
  359    402   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  360    403   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  361    404   
                    "website_redirect_location",
  362    405   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  363    406   
                )
  364    407   
            })?;
  365    408   
            builder = builder.header("x-amz-website-redirect-location", header_value);
  366    409   
        }
         410  +
    }
  367    411   
    if let ::std::option::Option::Some(inner_45) = &input.sse_customer_algorithm {
  368    412   
        let formatted_46 = inner_45.as_str();
         413  +
        if !formatted_46.is_empty() {
  369    414   
            let header_value = formatted_46;
  370    415   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  371    416   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  372    417   
                    "sse_customer_algorithm",
  373    418   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  374    419   
                )
  375    420   
            })?;
  376    421   
            builder = builder.header("x-amz-server-side-encryption-customer-algorithm", header_value);
  377    422   
        }
         423  +
    }
  378    424   
    if let ::std::option::Option::Some(inner_47) = &input.sse_customer_key {
  379    425   
        let formatted_48 = inner_47.as_str();
         426  +
        if !formatted_48.is_empty() {
  380    427   
            let header_value = formatted_48;
  381    428   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  382    429   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  383    430   
                    "sse_customer_key",
  384    431   
                    format!("`{}` cannot be used as a header value: {}", &"*** Sensitive Data Redacted ***", err),
  385    432   
                )
  386    433   
            })?;
  387    434   
            builder = builder.header("x-amz-server-side-encryption-customer-key", header_value);
  388    435   
        }
         436  +
    }
  389    437   
    if let ::std::option::Option::Some(inner_49) = &input.sse_customer_key_md5 {
  390    438   
        let formatted_50 = inner_49.as_str();
         439  +
        if !formatted_50.is_empty() {
  391    440   
            let header_value = formatted_50;
  392    441   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  393    442   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  394    443   
                    "sse_customer_key_md5",
  395    444   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  396    445   
                )
  397    446   
            })?;
  398    447   
            builder = builder.header("x-amz-server-side-encryption-customer-key-MD5", header_value);
  399    448   
        }
         449  +
    }
  400    450   
    if let ::std::option::Option::Some(inner_51) = &input.ssekms_key_id {
  401    451   
        let formatted_52 = inner_51.as_str();
         452  +
        if !formatted_52.is_empty() {
  402    453   
            let header_value = formatted_52;
  403    454   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  404    455   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  405    456   
                    "ssekms_key_id",
  406    457   
                    format!("`{}` cannot be used as a header value: {}", &"*** Sensitive Data Redacted ***", err),
  407    458   
                )
  408    459   
            })?;
  409    460   
            builder = builder.header("x-amz-server-side-encryption-aws-kms-key-id", header_value);
  410    461   
        }
         462  +
    }
  411    463   
    if let ::std::option::Option::Some(inner_53) = &input.ssekms_encryption_context {
  412    464   
        let formatted_54 = inner_53.as_str();
         465  +
        if !formatted_54.is_empty() {
  413    466   
            let header_value = formatted_54;
  414    467   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  415    468   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  416    469   
                    "ssekms_encryption_context",
  417    470   
                    format!("`{}` cannot be used as a header value: {}", &"*** Sensitive Data Redacted ***", err),
  418    471   
                )
  419    472   
            })?;
  420    473   
            builder = builder.header("x-amz-server-side-encryption-context", header_value);
  421    474   
        }
         475  +
    }
  422    476   
    if let ::std::option::Option::Some(inner_55) = &input.bucket_key_enabled {
  423    477   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_55);
  424    478   
        let formatted_56 = encoder.encode();
         479  +
        if !formatted_56.is_empty() {
  425    480   
            let header_value = formatted_56;
  426    481   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  427    482   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  428    483   
                    "bucket_key_enabled",
  429    484   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  430    485   
                )
  431    486   
            })?;
  432    487   
            builder = builder.header("x-amz-server-side-encryption-bucket-key-enabled", header_value);
  433    488   
        }
         489  +
    }
  434    490   
    if let ::std::option::Option::Some(inner_57) = &input.copy_source_sse_customer_algorithm {
  435    491   
        let formatted_58 = inner_57.as_str();
         492  +
        if !formatted_58.is_empty() {
  436    493   
            let header_value = formatted_58;
  437    494   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  438    495   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  439    496   
                    "copy_source_sse_customer_algorithm",
  440    497   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  441    498   
                )
  442    499   
            })?;
  443    500   
            builder = builder.header("x-amz-copy-source-server-side-encryption-customer-algorithm", header_value);
  444    501   
        }
         502  +
    }
  445    503   
    if let ::std::option::Option::Some(inner_59) = &input.copy_source_sse_customer_key {
  446    504   
        let formatted_60 = inner_59.as_str();
         505  +
        if !formatted_60.is_empty() {
  447    506   
            let header_value = formatted_60;
  448    507   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  449    508   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  450    509   
                    "copy_source_sse_customer_key",
  451    510   
                    format!("`{}` cannot be used as a header value: {}", &"*** Sensitive Data Redacted ***", err),
  452    511   
                )
  453    512   
            })?;
  454    513   
            builder = builder.header("x-amz-copy-source-server-side-encryption-customer-key", header_value);
  455    514   
        }
         515  +
    }
  456    516   
    if let ::std::option::Option::Some(inner_61) = &input.copy_source_sse_customer_key_md5 {
  457    517   
        let formatted_62 = inner_61.as_str();
         518  +
        if !formatted_62.is_empty() {
  458    519   
            let header_value = formatted_62;
  459    520   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  460    521   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  461    522   
                    "copy_source_sse_customer_key_md5",
  462    523   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  463    524   
                )
  464    525   
            })?;
  465    526   
            builder = builder.header("x-amz-copy-source-server-side-encryption-customer-key-MD5", header_value);
  466    527   
        }
         528  +
    }
  467    529   
    if let ::std::option::Option::Some(inner_63) = &input.request_payer {
  468    530   
        let formatted_64 = inner_63.as_str();
         531  +
        if !formatted_64.is_empty() {
  469    532   
            let header_value = formatted_64;
  470    533   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  471    534   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  472    535   
                    "request_payer",
  473    536   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  474    537   
                )
  475    538   
            })?;
  476    539   
            builder = builder.header("x-amz-request-payer", header_value);
  477    540   
        }
         541  +
    }
  478    542   
    if let ::std::option::Option::Some(inner_65) = &input.tagging {
  479    543   
        let formatted_66 = inner_65.as_str();
         544  +
        if !formatted_66.is_empty() {
  480    545   
            let header_value = formatted_66;
  481    546   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  482    547   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  483    548   
                    "tagging",
  484    549   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  485    550   
                )
  486    551   
            })?;
  487    552   
            builder = builder.header("x-amz-tagging", header_value);
  488    553   
        }
         554  +
    }
  489    555   
    if let ::std::option::Option::Some(inner_67) = &input.object_lock_mode {
  490    556   
        let formatted_68 = inner_67.as_str();
         557  +
        if !formatted_68.is_empty() {
  491    558   
            let header_value = formatted_68;
  492    559   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  493    560   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  494    561   
                    "object_lock_mode",
  495    562   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  496    563   
                )
  497    564   
            })?;
  498    565   
            builder = builder.header("x-amz-object-lock-mode", header_value);
  499    566   
        }
         567  +
    }
  500    568   
    if let ::std::option::Option::Some(inner_69) = &input.object_lock_retain_until_date {
  501    569   
        let formatted_70 = inner_69.fmt(::aws_smithy_types::date_time::Format::DateTime)?;
         570  +
        if !formatted_70.is_empty() {
  502    571   
            let header_value = formatted_70;
  503    572   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  504    573   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  505    574   
                    "object_lock_retain_until_date",
  506    575   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  507    576   
                )
  508    577   
            })?;
  509    578   
            builder = builder.header("x-amz-object-lock-retain-until-date", header_value);
  510    579   
        }
         580  +
    }
  511    581   
    if let ::std::option::Option::Some(inner_71) = &input.object_lock_legal_hold_status {
  512    582   
        let formatted_72 = inner_71.as_str();
         583  +
        if !formatted_72.is_empty() {
  513    584   
            let header_value = formatted_72;
  514    585   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  515    586   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  516    587   
                    "object_lock_legal_hold_status",
  517    588   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  518    589   
                )
  519    590   
            })?;
  520    591   
            builder = builder.header("x-amz-object-lock-legal-hold", header_value);
  521    592   
        }
         593  +
    }
  522    594   
    if let ::std::option::Option::Some(inner_73) = &input.expected_bucket_owner {
  523    595   
        let formatted_74 = inner_73.as_str();
         596  +
        if !formatted_74.is_empty() {
  524    597   
            let header_value = formatted_74;
  525    598   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  526    599   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  527    600   
                    "expected_bucket_owner",
  528    601   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  529    602   
                )
  530    603   
            })?;
  531    604   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
  532    605   
        }
         606  +
    }
  533    607   
    if let ::std::option::Option::Some(inner_75) = &input.expected_source_bucket_owner {
  534    608   
        let formatted_76 = inner_75.as_str();
         609  +
        if !formatted_76.is_empty() {
  535    610   
            let header_value = formatted_76;
  536    611   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  537    612   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  538    613   
                    "expected_source_bucket_owner",
  539    614   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  540    615   
                )
  541    616   
            })?;
  542    617   
            builder = builder.header("x-amz-source-expected-bucket-owner", header_value);
  543    618   
        }
         619  +
    }
  544    620   
    if let ::std::option::Option::Some(inner_77) = &input.metadata {
  545    621   
        {
  546    622   
            for (k, v) in inner_77 {
  547    623   
                use std::str::FromStr;
  548    624   
                let header_name = http::header::HeaderName::from_str(&format!("{}{}", "x-amz-meta-", &k)).map_err(|err| {
  549    625   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
  550    626   
                        "metadata",
  551    627   
                        format!("`{k}` cannot be used as a header name: {err}"),
  552    628   
                    )
  553    629   
                })?;

tmp-codegen-diff/aws-sdk/sdk/s3/src/protocol_serde/shape_create_bucket.rs

@@ -50,50 +168,184 @@
   70     70   
        output.build()
   71     71   
    })
   72     72   
}
   73     73   
   74     74   
pub fn ser_create_bucket_headers(
   75     75   
    input: &crate::operation::create_bucket::CreateBucketInput,
   76     76   
    mut builder: ::http::request::Builder,
   77     77   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   78     78   
    if let ::std::option::Option::Some(inner_1) = &input.acl {
   79     79   
        let formatted_2 = inner_1.as_str();
          80  +
        if !formatted_2.is_empty() {
   80     81   
            let header_value = formatted_2;
   81     82   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   82     83   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   83     84   
                    "acl",
   84     85   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   85     86   
                )
   86     87   
            })?;
   87     88   
            builder = builder.header("x-amz-acl", header_value);
   88     89   
        }
          90  +
    }
   89     91   
    if let ::std::option::Option::Some(inner_3) = &input.grant_full_control {
   90     92   
        let formatted_4 = inner_3.as_str();
          93  +
        if !formatted_4.is_empty() {
   91     94   
            let header_value = formatted_4;
   92     95   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   93     96   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   94     97   
                    "grant_full_control",
   95     98   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   96     99   
                )
   97    100   
            })?;
   98    101   
            builder = builder.header("x-amz-grant-full-control", header_value);
   99    102   
        }
         103  +
    }
  100    104   
    if let ::std::option::Option::Some(inner_5) = &input.grant_read {
  101    105   
        let formatted_6 = inner_5.as_str();
         106  +
        if !formatted_6.is_empty() {
  102    107   
            let header_value = formatted_6;
  103    108   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  104    109   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  105    110   
                    "grant_read",
  106    111   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  107    112   
                )
  108    113   
            })?;
  109    114   
            builder = builder.header("x-amz-grant-read", header_value);
  110    115   
        }
         116  +
    }
  111    117   
    if let ::std::option::Option::Some(inner_7) = &input.grant_read_acp {
  112    118   
        let formatted_8 = inner_7.as_str();
         119  +
        if !formatted_8.is_empty() {
  113    120   
            let header_value = formatted_8;
  114    121   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  115    122   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  116    123   
                    "grant_read_acp",
  117    124   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  118    125   
                )
  119    126   
            })?;
  120    127   
            builder = builder.header("x-amz-grant-read-acp", header_value);
  121    128   
        }
         129  +
    }
  122    130   
    if let ::std::option::Option::Some(inner_9) = &input.grant_write {
  123    131   
        let formatted_10 = inner_9.as_str();
         132  +
        if !formatted_10.is_empty() {
  124    133   
            let header_value = formatted_10;
  125    134   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  126    135   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  127    136   
                    "grant_write",
  128    137   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  129    138   
                )
  130    139   
            })?;
  131    140   
            builder = builder.header("x-amz-grant-write", header_value);
  132    141   
        }
         142  +
    }
  133    143   
    if let ::std::option::Option::Some(inner_11) = &input.grant_write_acp {
  134    144   
        let formatted_12 = inner_11.as_str();
         145  +
        if !formatted_12.is_empty() {
  135    146   
            let header_value = formatted_12;
  136    147   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  137    148   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  138    149   
                    "grant_write_acp",
  139    150   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  140    151   
                )
  141    152   
            })?;
  142    153   
            builder = builder.header("x-amz-grant-write-acp", header_value);
  143    154   
        }
         155  +
    }
  144    156   
    if let ::std::option::Option::Some(inner_13) = &input.object_lock_enabled_for_bucket {
  145    157   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_13);
  146    158   
        let formatted_14 = encoder.encode();
         159  +
        if !formatted_14.is_empty() {
  147    160   
            let header_value = formatted_14;
  148    161   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  149    162   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  150    163   
                    "object_lock_enabled_for_bucket",
  151    164   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  152    165   
                )
  153    166   
            })?;
  154    167   
            builder = builder.header("x-amz-bucket-object-lock-enabled", header_value);
  155    168   
        }
         169  +
    }
  156    170   
    if let ::std::option::Option::Some(inner_15) = &input.object_ownership {
  157    171   
        let formatted_16 = inner_15.as_str();
         172  +
        if !formatted_16.is_empty() {
  158    173   
            let header_value = formatted_16;
  159    174   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  160    175   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  161    176   
                    "object_ownership",
  162    177   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  163    178   
                )
  164    179   
            })?;
  165    180   
            builder = builder.header("x-amz-object-ownership", header_value);
  166    181   
        }
         182  +
    }
  167    183   
    Ok(builder)
  168    184   
}

tmp-codegen-diff/aws-sdk/sdk/s3/src/protocol_serde/shape_create_multipart_upload.rs

@@ -86,86 +441,495 @@
  106    106   
        output.build()
  107    107   
    })
  108    108   
}
  109    109   
  110    110   
pub fn ser_create_multipart_upload_headers(
  111    111   
    input: &crate::operation::create_multipart_upload::CreateMultipartUploadInput,
  112    112   
    mut builder: ::http::request::Builder,
  113    113   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  114    114   
    if let ::std::option::Option::Some(inner_1) = &input.acl {
  115    115   
        let formatted_2 = inner_1.as_str();
         116  +
        if !formatted_2.is_empty() {
  116    117   
            let header_value = formatted_2;
  117    118   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  118    119   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  119    120   
                    "acl",
  120    121   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  121    122   
                )
  122    123   
            })?;
  123    124   
            builder = builder.header("x-amz-acl", header_value);
  124    125   
        }
         126  +
    }
  125    127   
    if let ::std::option::Option::Some(inner_3) = &input.cache_control {
  126    128   
        let formatted_4 = inner_3.as_str();
         129  +
        if !formatted_4.is_empty() {
  127    130   
            let header_value = formatted_4;
  128    131   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  129    132   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  130    133   
                    "cache_control",
  131    134   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  132    135   
                )
  133    136   
            })?;
  134    137   
            builder = builder.header("Cache-Control", header_value);
  135    138   
        }
         139  +
    }
  136    140   
    if let ::std::option::Option::Some(inner_5) = &input.content_disposition {
  137    141   
        let formatted_6 = inner_5.as_str();
         142  +
        if !formatted_6.is_empty() {
  138    143   
            let header_value = formatted_6;
  139    144   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  140    145   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  141    146   
                    "content_disposition",
  142    147   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  143    148   
                )
  144    149   
            })?;
  145    150   
            builder = builder.header("Content-Disposition", header_value);
  146    151   
        }
         152  +
    }
  147    153   
    if let ::std::option::Option::Some(inner_7) = &input.content_encoding {
  148    154   
        let formatted_8 = inner_7.as_str();
         155  +
        if !formatted_8.is_empty() {
  149    156   
            let header_value = formatted_8;
  150    157   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  151    158   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  152    159   
                    "content_encoding",
  153    160   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  154    161   
                )
  155    162   
            })?;
  156    163   
            builder = builder.header("Content-Encoding", header_value);
  157    164   
        }
         165  +
    }
  158    166   
    if let ::std::option::Option::Some(inner_9) = &input.content_language {
  159    167   
        let formatted_10 = inner_9.as_str();
         168  +
        if !formatted_10.is_empty() {
  160    169   
            let header_value = formatted_10;
  161    170   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  162    171   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  163    172   
                    "content_language",
  164    173   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  165    174   
                )
  166    175   
            })?;
  167    176   
            builder = builder.header("Content-Language", header_value);
  168    177   
        }
         178  +
    }
  169    179   
    if let ::std::option::Option::Some(inner_11) = &input.content_type {
  170    180   
        let formatted_12 = inner_11.as_str();
         181  +
        if !formatted_12.is_empty() {
  171    182   
            let header_value = formatted_12;
  172    183   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  173    184   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  174    185   
                    "content_type",
  175    186   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  176    187   
                )
  177    188   
            })?;
  178    189   
            builder = builder.header("Content-Type", header_value);
  179    190   
        }
         191  +
    }
  180    192   
    if let ::std::option::Option::Some(inner_13) = &input.expires {
  181    193   
        let formatted_14 = inner_13.fmt(::aws_smithy_types::date_time::Format::HttpDate)?;
         194  +
        if !formatted_14.is_empty() {
  182    195   
            let header_value = formatted_14;
  183    196   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  184    197   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  185    198   
                    "expires",
  186    199   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  187    200   
                )
  188    201   
            })?;
  189    202   
            builder = builder.header("Expires", header_value);
  190    203   
        }
         204  +
    }
  191    205   
    if let ::std::option::Option::Some(inner_15) = &input.grant_full_control {
  192    206   
        let formatted_16 = inner_15.as_str();
         207  +
        if !formatted_16.is_empty() {
  193    208   
            let header_value = formatted_16;
  194    209   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  195    210   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  196    211   
                    "grant_full_control",
  197    212   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  198    213   
                )
  199    214   
            })?;
  200    215   
            builder = builder.header("x-amz-grant-full-control", header_value);
  201    216   
        }
         217  +
    }
  202    218   
    if let ::std::option::Option::Some(inner_17) = &input.grant_read {
  203    219   
        let formatted_18 = inner_17.as_str();
         220  +
        if !formatted_18.is_empty() {
  204    221   
            let header_value = formatted_18;
  205    222   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  206    223   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  207    224   
                    "grant_read",
  208    225   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  209    226   
                )
  210    227   
            })?;
  211    228   
            builder = builder.header("x-amz-grant-read", header_value);
  212    229   
        }
         230  +
    }
  213    231   
    if let ::std::option::Option::Some(inner_19) = &input.grant_read_acp {
  214    232   
        let formatted_20 = inner_19.as_str();
         233  +
        if !formatted_20.is_empty() {
  215    234   
            let header_value = formatted_20;
  216    235   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  217    236   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  218    237   
                    "grant_read_acp",
  219    238   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  220    239   
                )
  221    240   
            })?;
  222    241   
            builder = builder.header("x-amz-grant-read-acp", header_value);
  223    242   
        }
         243  +
    }
  224    244   
    if let ::std::option::Option::Some(inner_21) = &input.grant_write_acp {
  225    245   
        let formatted_22 = inner_21.as_str();
         246  +
        if !formatted_22.is_empty() {
  226    247   
            let header_value = formatted_22;
  227    248   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  228    249   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  229    250   
                    "grant_write_acp",
  230    251   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  231    252   
                )
  232    253   
            })?;
  233    254   
            builder = builder.header("x-amz-grant-write-acp", header_value);
  234    255   
        }
         256  +
    }
  235    257   
    if let ::std::option::Option::Some(inner_23) = &input.server_side_encryption {
  236    258   
        let formatted_24 = inner_23.as_str();
         259  +
        if !formatted_24.is_empty() {
  237    260   
            let header_value = formatted_24;
  238    261   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  239    262   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  240    263   
                    "server_side_encryption",
  241    264   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  242    265   
                )
  243    266   
            })?;
  244    267   
            builder = builder.header("x-amz-server-side-encryption", header_value);
  245    268   
        }
         269  +
    }
  246    270   
    if let ::std::option::Option::Some(inner_25) = &input.storage_class {
  247    271   
        let formatted_26 = inner_25.as_str();
         272  +
        if !formatted_26.is_empty() {
  248    273   
            let header_value = formatted_26;
  249    274   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  250    275   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  251    276   
                    "storage_class",
  252    277   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  253    278   
                )
  254    279   
            })?;
  255    280   
            builder = builder.header("x-amz-storage-class", header_value);
  256    281   
        }
         282  +
    }
  257    283   
    if let ::std::option::Option::Some(inner_27) = &input.website_redirect_location {
  258    284   
        let formatted_28 = inner_27.as_str();
         285  +
        if !formatted_28.is_empty() {
  259    286   
            let header_value = formatted_28;
  260    287   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  261    288   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  262    289   
                    "website_redirect_location",
  263    290   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  264    291   
                )
  265    292   
            })?;
  266    293   
            builder = builder.header("x-amz-website-redirect-location", header_value);
  267    294   
        }
         295  +
    }
  268    296   
    if let ::std::option::Option::Some(inner_29) = &input.sse_customer_algorithm {
  269    297   
        let formatted_30 = inner_29.as_str();
         298  +
        if !formatted_30.is_empty() {
  270    299   
            let header_value = formatted_30;
  271    300   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  272    301   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  273    302   
                    "sse_customer_algorithm",
  274    303   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  275    304   
                )
  276    305   
            })?;
  277    306   
            builder = builder.header("x-amz-server-side-encryption-customer-algorithm", header_value);
  278    307   
        }
         308  +
    }
  279    309   
    if let ::std::option::Option::Some(inner_31) = &input.sse_customer_key {
  280    310   
        let formatted_32 = inner_31.as_str();
         311  +
        if !formatted_32.is_empty() {
  281    312   
            let header_value = formatted_32;
  282    313   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  283    314   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  284    315   
                    "sse_customer_key",
  285    316   
                    format!("`{}` cannot be used as a header value: {}", &"*** Sensitive Data Redacted ***", err),
  286    317   
                )
  287    318   
            })?;
  288    319   
            builder = builder.header("x-amz-server-side-encryption-customer-key", header_value);
  289    320   
        }
         321  +
    }
  290    322   
    if let ::std::option::Option::Some(inner_33) = &input.sse_customer_key_md5 {
  291    323   
        let formatted_34 = inner_33.as_str();
         324  +
        if !formatted_34.is_empty() {
  292    325   
            let header_value = formatted_34;
  293    326   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  294    327   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  295    328   
                    "sse_customer_key_md5",
  296    329   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  297    330   
                )
  298    331   
            })?;
  299    332   
            builder = builder.header("x-amz-server-side-encryption-customer-key-MD5", header_value);
  300    333   
        }
         334  +
    }
  301    335   
    if let ::std::option::Option::Some(inner_35) = &input.ssekms_key_id {
  302    336   
        let formatted_36 = inner_35.as_str();
         337  +
        if !formatted_36.is_empty() {
  303    338   
            let header_value = formatted_36;
  304    339   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  305    340   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  306    341   
                    "ssekms_key_id",
  307    342   
                    format!("`{}` cannot be used as a header value: {}", &"*** Sensitive Data Redacted ***", err),
  308    343   
                )
  309    344   
            })?;
  310    345   
            builder = builder.header("x-amz-server-side-encryption-aws-kms-key-id", header_value);
  311    346   
        }
         347  +
    }
  312    348   
    if let ::std::option::Option::Some(inner_37) = &input.ssekms_encryption_context {
  313    349   
        let formatted_38 = inner_37.as_str();
         350  +
        if !formatted_38.is_empty() {
  314    351   
            let header_value = formatted_38;
  315    352   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  316    353   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  317    354   
                    "ssekms_encryption_context",
  318    355   
                    format!("`{}` cannot be used as a header value: {}", &"*** Sensitive Data Redacted ***", err),
  319    356   
                )
  320    357   
            })?;
  321    358   
            builder = builder.header("x-amz-server-side-encryption-context", header_value);
  322    359   
        }
         360  +
    }
  323    361   
    if let ::std::option::Option::Some(inner_39) = &input.bucket_key_enabled {
  324    362   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_39);
  325    363   
        let formatted_40 = encoder.encode();
         364  +
        if !formatted_40.is_empty() {
  326    365   
            let header_value = formatted_40;
  327    366   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  328    367   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  329    368   
                    "bucket_key_enabled",
  330    369   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  331    370   
                )
  332    371   
            })?;
  333    372   
            builder = builder.header("x-amz-server-side-encryption-bucket-key-enabled", header_value);
  334    373   
        }
         374  +
    }
  335    375   
    if let ::std::option::Option::Some(inner_41) = &input.request_payer {
  336    376   
        let formatted_42 = inner_41.as_str();
         377  +
        if !formatted_42.is_empty() {
  337    378   
            let header_value = formatted_42;
  338    379   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  339    380   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  340    381   
                    "request_payer",
  341    382   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  342    383   
                )
  343    384   
            })?;
  344    385   
            builder = builder.header("x-amz-request-payer", header_value);
  345    386   
        }
         387  +
    }
  346    388   
    if let ::std::option::Option::Some(inner_43) = &input.tagging {
  347    389   
        let formatted_44 = inner_43.as_str();
         390  +
        if !formatted_44.is_empty() {
  348    391   
            let header_value = formatted_44;
  349    392   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  350    393   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  351    394   
                    "tagging",
  352    395   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  353    396   
                )
  354    397   
            })?;
  355    398   
            builder = builder.header("x-amz-tagging", header_value);
  356    399   
        }
         400  +
    }
  357    401   
    if let ::std::option::Option::Some(inner_45) = &input.object_lock_mode {
  358    402   
        let formatted_46 = inner_45.as_str();
         403  +
        if !formatted_46.is_empty() {
  359    404   
            let header_value = formatted_46;
  360    405   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  361    406   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  362    407   
                    "object_lock_mode",
  363    408   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  364    409   
                )
  365    410   
            })?;
  366    411   
            builder = builder.header("x-amz-object-lock-mode", header_value);
  367    412   
        }
         413  +
    }
  368    414   
    if let ::std::option::Option::Some(inner_47) = &input.object_lock_retain_until_date {
  369    415   
        let formatted_48 = inner_47.fmt(::aws_smithy_types::date_time::Format::DateTime)?;
         416  +
        if !formatted_48.is_empty() {
  370    417   
            let header_value = formatted_48;
  371    418   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  372    419   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  373    420   
                    "object_lock_retain_until_date",
  374    421   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  375    422   
                )
  376    423   
            })?;
  377    424   
            builder = builder.header("x-amz-object-lock-retain-until-date", header_value);
  378    425   
        }
         426  +
    }
  379    427   
    if let ::std::option::Option::Some(inner_49) = &input.object_lock_legal_hold_status {
  380    428   
        let formatted_50 = inner_49.as_str();
         429  +
        if !formatted_50.is_empty() {
  381    430   
            let header_value = formatted_50;
  382    431   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  383    432   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  384    433   
                    "object_lock_legal_hold_status",
  385    434   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  386    435   
                )
  387    436   
            })?;
  388    437   
            builder = builder.header("x-amz-object-lock-legal-hold", header_value);
  389    438   
        }
         439  +
    }
  390    440   
    if let ::std::option::Option::Some(inner_51) = &input.expected_bucket_owner {
  391    441   
        let formatted_52 = inner_51.as_str();
         442  +
        if !formatted_52.is_empty() {
  392    443   
            let header_value = formatted_52;
  393    444   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  394    445   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  395    446   
                    "expected_bucket_owner",
  396    447   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  397    448   
                )
  398    449   
            })?;
  399    450   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
  400    451   
        }
         452  +
    }
  401    453   
    if let ::std::option::Option::Some(inner_53) = &input.checksum_algorithm {
  402    454   
        let formatted_54 = inner_53.as_str();
         455  +
        if !formatted_54.is_empty() {
  403    456   
            let header_value = formatted_54;
  404    457   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  405    458   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  406    459   
                    "checksum_algorithm",
  407    460   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  408    461   
                )
  409    462   
            })?;
  410    463   
            builder = builder.header("x-amz-checksum-algorithm", header_value);
  411    464   
        }
         465  +
    }
  412    466   
    if let ::std::option::Option::Some(inner_55) = &input.metadata {
  413    467   
        {
  414    468   
            for (k, v) in inner_55 {
  415    469   
                use std::str::FromStr;
  416    470   
                let header_name = http::header::HeaderName::from_str(&format!("{}{}", "x-amz-meta-", &k)).map_err(|err| {
  417    471   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
  418    472   
                        "metadata",
  419    473   
                        format!("`{k}` cannot be used as a header name: {err}"),
  420    474   
                    )
  421    475   
                })?;