AWS SDK

AWS SDK

rev. 000b37a512bd3be1a17b4f3d5bf60e5446dbc2dd (ignoring whitespace)

Files changed:

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

@@ -23,23 +111,119 @@
   43     43   
    let generic = generic_builder.build();
   44     44   
    Err(crate::operation::select_object_content::SelectObjectContentError::generic(generic))
   45     45   
}
   46     46   
   47     47   
pub fn ser_select_object_content_headers(
   48     48   
    input: &crate::operation::select_object_content::SelectObjectContentInput,
   49     49   
    mut builder: ::http::request::Builder,
   50     50   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   51     51   
    if let ::std::option::Option::Some(inner_1) = &input.sse_customer_algorithm {
   52     52   
        let formatted_2 = inner_1.as_str();
          53  +
        if !formatted_2.is_empty() {
   53     54   
            let header_value = formatted_2;
   54     55   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   55     56   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   56     57   
                    "sse_customer_algorithm",
   57     58   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   58     59   
                )
   59     60   
            })?;
   60     61   
            builder = builder.header("x-amz-server-side-encryption-customer-algorithm", header_value);
   61     62   
        }
          63  +
    }
   62     64   
    if let ::std::option::Option::Some(inner_3) = &input.sse_customer_key {
   63     65   
        let formatted_4 = inner_3.as_str();
          66  +
        if !formatted_4.is_empty() {
   64     67   
            let header_value = formatted_4;
   65     68   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   66     69   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   67     70   
                    "sse_customer_key",
   68     71   
                    format!("`{}` cannot be used as a header value: {}", &"*** Sensitive Data Redacted ***", err),
   69     72   
                )
   70     73   
            })?;
   71     74   
            builder = builder.header("x-amz-server-side-encryption-customer-key", header_value);
   72     75   
        }
          76  +
    }
   73     77   
    if let ::std::option::Option::Some(inner_5) = &input.sse_customer_key_md5 {
   74     78   
        let formatted_6 = inner_5.as_str();
          79  +
        if !formatted_6.is_empty() {
   75     80   
            let header_value = formatted_6;
   76     81   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   77     82   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   78     83   
                    "sse_customer_key_md5",
   79     84   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   80     85   
                )
   81     86   
            })?;
   82     87   
            builder = builder.header("x-amz-server-side-encryption-customer-key-MD5", header_value);
   83     88   
        }
          89  +
    }
   84     90   
    if let ::std::option::Option::Some(inner_7) = &input.expected_bucket_owner {
   85     91   
        let formatted_8 = inner_7.as_str();
          92  +
        if !formatted_8.is_empty() {
   86     93   
            let header_value = formatted_8;
   87     94   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   88     95   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   89     96   
                    "expected_bucket_owner",
   90     97   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   91     98   
                )
   92     99   
            })?;
   93    100   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   94    101   
        }
         102  +
    }
   95    103   
    Ok(builder)
   96    104   
}
   97    105   
   98    106   
pub fn ser_select_object_content_op_input(
   99    107   
    input: &crate::operation::select_object_content::SelectObjectContentInput,
  100    108   
) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  101    109   
    let mut out = String::new();
  102    110   
    {
  103    111   
        let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
  104    112   
        #[allow(unused_mut)]

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

@@ -73,73 +234,258 @@
   93     93   
    })
   94     94   
}
   95     95   
   96     96   
pub fn ser_upload_part_headers(
   97     97   
    input: &crate::operation::upload_part::UploadPartInput,
   98     98   
    mut builder: ::http::request::Builder,
   99     99   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  100    100   
    if let ::std::option::Option::Some(inner_1) = &input.content_length {
  101    101   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_1);
  102    102   
        let formatted_2 = encoder.encode();
         103  +
        if !formatted_2.is_empty() {
  103    104   
            let header_value = formatted_2;
  104    105   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  105    106   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  106    107   
                    "content_length",
  107    108   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  108    109   
                )
  109    110   
            })?;
  110    111   
            builder = builder.header("Content-Length", header_value);
  111    112   
        }
         113  +
    }
  112    114   
    if let ::std::option::Option::Some(inner_3) = &input.content_md5 {
  113    115   
        let formatted_4 = inner_3.as_str();
         116  +
        if !formatted_4.is_empty() {
  114    117   
            let header_value = formatted_4;
  115    118   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  116    119   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  117    120   
                    "content_md5",
  118    121   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  119    122   
                )
  120    123   
            })?;
  121    124   
            builder = builder.header("Content-MD5", header_value);
  122    125   
        }
         126  +
    }
  123    127   
    if let ::std::option::Option::Some(inner_5) = &input.checksum_algorithm {
  124    128   
        let formatted_6 = inner_5.as_str();
         129  +
        if !formatted_6.is_empty() {
  125    130   
            let header_value = formatted_6;
  126    131   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  127    132   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  128    133   
                    "checksum_algorithm",
  129    134   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  130    135   
                )
  131    136   
            })?;
  132    137   
            builder = builder.header("x-amz-sdk-checksum-algorithm", header_value);
  133    138   
        }
         139  +
    }
  134    140   
    if let ::std::option::Option::Some(inner_7) = &input.checksum_crc32 {
  135    141   
        let formatted_8 = inner_7.as_str();
         142  +
        if !formatted_8.is_empty() {
  136    143   
            let header_value = formatted_8;
  137    144   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  138    145   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  139    146   
                    "checksum_crc32",
  140    147   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  141    148   
                )
  142    149   
            })?;
  143    150   
            builder = builder.header("x-amz-checksum-crc32", header_value);
  144    151   
        }
         152  +
    }
  145    153   
    if let ::std::option::Option::Some(inner_9) = &input.checksum_crc32_c {
  146    154   
        let formatted_10 = inner_9.as_str();
         155  +
        if !formatted_10.is_empty() {
  147    156   
            let header_value = formatted_10;
  148    157   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  149    158   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  150    159   
                    "checksum_crc32_c",
  151    160   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  152    161   
                )
  153    162   
            })?;
  154    163   
            builder = builder.header("x-amz-checksum-crc32c", header_value);
  155    164   
        }
         165  +
    }
  156    166   
    if let ::std::option::Option::Some(inner_11) = &input.checksum_sha1 {
  157    167   
        let formatted_12 = inner_11.as_str();
         168  +
        if !formatted_12.is_empty() {
  158    169   
            let header_value = formatted_12;
  159    170   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  160    171   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  161    172   
                    "checksum_sha1",
  162    173   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  163    174   
                )
  164    175   
            })?;
  165    176   
            builder = builder.header("x-amz-checksum-sha1", header_value);
  166    177   
        }
         178  +
    }
  167    179   
    if let ::std::option::Option::Some(inner_13) = &input.checksum_sha256 {
  168    180   
        let formatted_14 = inner_13.as_str();
         181  +
        if !formatted_14.is_empty() {
  169    182   
            let header_value = formatted_14;
  170    183   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  171    184   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  172    185   
                    "checksum_sha256",
  173    186   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  174    187   
                )
  175    188   
            })?;
  176    189   
            builder = builder.header("x-amz-checksum-sha256", header_value);
  177    190   
        }
         191  +
    }
  178    192   
    if let ::std::option::Option::Some(inner_15) = &input.sse_customer_algorithm {
  179    193   
        let formatted_16 = inner_15.as_str();
         194  +
        if !formatted_16.is_empty() {
  180    195   
            let header_value = formatted_16;
  181    196   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  182    197   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  183    198   
                    "sse_customer_algorithm",
  184    199   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  185    200   
                )
  186    201   
            })?;
  187    202   
            builder = builder.header("x-amz-server-side-encryption-customer-algorithm", header_value);
  188    203   
        }
         204  +
    }
  189    205   
    if let ::std::option::Option::Some(inner_17) = &input.sse_customer_key {
  190    206   
        let formatted_18 = inner_17.as_str();
         207  +
        if !formatted_18.is_empty() {
  191    208   
            let header_value = formatted_18;
  192    209   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  193    210   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  194    211   
                    "sse_customer_key",
  195    212   
                    format!("`{}` cannot be used as a header value: {}", &"*** Sensitive Data Redacted ***", err),
  196    213   
                )
  197    214   
            })?;
  198    215   
            builder = builder.header("x-amz-server-side-encryption-customer-key", header_value);
  199    216   
        }
         217  +
    }
  200    218   
    if let ::std::option::Option::Some(inner_19) = &input.sse_customer_key_md5 {
  201    219   
        let formatted_20 = inner_19.as_str();
         220  +
        if !formatted_20.is_empty() {
  202    221   
            let header_value = formatted_20;
  203    222   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  204    223   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  205    224   
                    "sse_customer_key_md5",
  206    225   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  207    226   
                )
  208    227   
            })?;
  209    228   
            builder = builder.header("x-amz-server-side-encryption-customer-key-MD5", header_value);
  210    229   
        }
         230  +
    }
  211    231   
    if let ::std::option::Option::Some(inner_21) = &input.request_payer {
  212    232   
        let formatted_22 = inner_21.as_str();
         233  +
        if !formatted_22.is_empty() {
  213    234   
            let header_value = formatted_22;
  214    235   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  215    236   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  216    237   
                    "request_payer",
  217    238   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  218    239   
                )
  219    240   
            })?;
  220    241   
            builder = builder.header("x-amz-request-payer", header_value);
  221    242   
        }
         243  +
    }
  222    244   
    if let ::std::option::Option::Some(inner_23) = &input.expected_bucket_owner {
  223    245   
        let formatted_24 = inner_23.as_str();
         246  +
        if !formatted_24.is_empty() {
  224    247   
            let header_value = formatted_24;
  225    248   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  226    249   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  227    250   
                    "expected_bucket_owner",
  228    251   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  229    252   
                )
  230    253   
            })?;
  231    254   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
  232    255   
        }
         256  +
    }
  233    257   
    Ok(builder)
  234    258   
}

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

@@ -60,60 +254,284 @@
   80     80   
        output.build()
   81     81   
    })
   82     82   
}
   83     83   
   84     84   
pub fn ser_upload_part_copy_headers(
   85     85   
    input: &crate::operation::upload_part_copy::UploadPartCopyInput,
   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.copy_source {
   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   
                    "copy_source",
   94     95   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   95     96   
                )
   96     97   
            })?;
   97     98   
            builder = builder.header("x-amz-copy-source", header_value);
   98     99   
        }
         100  +
    }
   99    101   
    if let ::std::option::Option::Some(inner_3) = &input.copy_source_if_match {
  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   
                    "copy_source_if_match",
  105    108   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  106    109   
                )
  107    110   
            })?;
  108    111   
            builder = builder.header("x-amz-copy-source-if-match", header_value);
  109    112   
        }
         113  +
    }
  110    114   
    if let ::std::option::Option::Some(inner_5) = &input.copy_source_if_modified_since {
  111    115   
        let formatted_6 = inner_5.fmt(::aws_smithy_types::date_time::Format::HttpDate)?;
         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   
                    "copy_source_if_modified_since",
  116    121   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  117    122   
                )
  118    123   
            })?;
  119    124   
            builder = builder.header("x-amz-copy-source-if-modified-since", header_value);
  120    125   
        }
         126  +
    }
  121    127   
    if let ::std::option::Option::Some(inner_7) = &input.copy_source_if_none_match {
  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   
                    "copy_source_if_none_match",
  127    134   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  128    135   
                )
  129    136   
            })?;
  130    137   
            builder = builder.header("x-amz-copy-source-if-none-match", header_value);
  131    138   
        }
         139  +
    }
  132    140   
    if let ::std::option::Option::Some(inner_9) = &input.copy_source_if_unmodified_since {
  133    141   
        let formatted_10 = inner_9.fmt(::aws_smithy_types::date_time::Format::HttpDate)?;
         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   
                    "copy_source_if_unmodified_since",
  138    147   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  139    148   
                )
  140    149   
            })?;
  141    150   
            builder = builder.header("x-amz-copy-source-if-unmodified-since", header_value);
  142    151   
        }
         152  +
    }
  143    153   
    if let ::std::option::Option::Some(inner_11) = &input.copy_source_range {
  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   
                    "copy_source_range",
  149    160   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  150    161   
                )
  151    162   
            })?;
  152    163   
            builder = builder.header("x-amz-copy-source-range", 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   
    if let ::std::option::Option::Some(inner_19) = &input.copy_source_sse_customer_algorithm {
  188    206   
        let formatted_20 = inner_19.as_str();
         207  +
        if !formatted_20.is_empty() {
  189    208   
            let header_value = formatted_20;
  190    209   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  191    210   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  192    211   
                    "copy_source_sse_customer_algorithm",
  193    212   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  194    213   
                )
  195    214   
            })?;
  196    215   
            builder = builder.header("x-amz-copy-source-server-side-encryption-customer-algorithm", header_value);
  197    216   
        }
         217  +
    }
  198    218   
    if let ::std::option::Option::Some(inner_21) = &input.copy_source_sse_customer_key {
  199    219   
        let formatted_22 = inner_21.as_str();
         220  +
        if !formatted_22.is_empty() {
  200    221   
            let header_value = formatted_22;
  201    222   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  202    223   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  203    224   
                    "copy_source_sse_customer_key",
  204    225   
                    format!("`{}` cannot be used as a header value: {}", &"*** Sensitive Data Redacted ***", err),
  205    226   
                )
  206    227   
            })?;
  207    228   
            builder = builder.header("x-amz-copy-source-server-side-encryption-customer-key", header_value);
  208    229   
        }
         230  +
    }
  209    231   
    if let ::std::option::Option::Some(inner_23) = &input.copy_source_sse_customer_key_md5 {
  210    232   
        let formatted_24 = inner_23.as_str();
         233  +
        if !formatted_24.is_empty() {
  211    234   
            let header_value = formatted_24;
  212    235   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  213    236   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  214    237   
                    "copy_source_sse_customer_key_md5",
  215    238   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  216    239   
                )
  217    240   
            })?;
  218    241   
            builder = builder.header("x-amz-copy-source-server-side-encryption-customer-key-MD5", header_value);
  219    242   
        }
         243  +
    }
  220    244   
    if let ::std::option::Option::Some(inner_25) = &input.request_payer {
  221    245   
        let formatted_26 = inner_25.as_str();
         246  +
        if !formatted_26.is_empty() {
  222    247   
            let header_value = formatted_26;
  223    248   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  224    249   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  225    250   
                    "request_payer",
  226    251   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  227    252   
                )
  228    253   
            })?;
  229    254   
            builder = builder.header("x-amz-request-payer", header_value);
  230    255   
        }
         256  +
    }
  231    257   
    if let ::std::option::Option::Some(inner_27) = &input.expected_bucket_owner {
  232    258   
        let formatted_28 = inner_27.as_str();
         259  +
        if !formatted_28.is_empty() {
  233    260   
            let header_value = formatted_28;
  234    261   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  235    262   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  236    263   
                    "expected_bucket_owner",
  237    264   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  238    265   
                )
  239    266   
            })?;
  240    267   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
  241    268   
        }
         269  +
    }
  242    270   
    if let ::std::option::Option::Some(inner_29) = &input.expected_source_bucket_owner {
  243    271   
        let formatted_30 = inner_29.as_str();
         272  +
        if !formatted_30.is_empty() {
  244    273   
            let header_value = formatted_30;
  245    274   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  246    275   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  247    276   
                    "expected_source_bucket_owner",
  248    277   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  249    278   
                )
  250    279   
            })?;
  251    280   
            builder = builder.header("x-amz-source-expected-bucket-owner", header_value);
  252    281   
        }
         282  +
    }
  253    283   
    Ok(builder)
  254    284   
}

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

@@ -14,14 +489,565 @@
   34     34   
        output.build()
   35     35   
    })
   36     36   
}
   37     37   
   38     38   
pub fn ser_write_get_object_response_headers(
   39     39   
    input: &crate::operation::write_get_object_response::WriteGetObjectResponseInput,
   40     40   
    mut builder: ::http::request::Builder,
   41     41   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   42     42   
    if let ::std::option::Option::Some(inner_1) = &input.request_route {
   43     43   
        let formatted_2 = inner_1.as_str();
          44  +
        if !formatted_2.is_empty() {
   44     45   
            let header_value = formatted_2;
   45     46   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   46     47   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   47     48   
                    "request_route",
   48     49   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   49     50   
                )
   50     51   
            })?;
   51     52   
            builder = builder.header("x-amz-request-route", header_value);
   52     53   
        }
          54  +
    }
   53     55   
    if let ::std::option::Option::Some(inner_3) = &input.request_token {
   54     56   
        let formatted_4 = inner_3.as_str();
          57  +
        if !formatted_4.is_empty() {
   55     58   
            let header_value = formatted_4;
   56     59   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   57     60   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   58     61   
                    "request_token",
   59     62   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   60     63   
                )
   61     64   
            })?;
   62     65   
            builder = builder.header("x-amz-request-token", header_value);
   63     66   
        }
          67  +
    }
   64     68   
    if let ::std::option::Option::Some(inner_5) = &input.status_code {
   65     69   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_5);
   66     70   
        let formatted_6 = encoder.encode();
          71  +
        if !formatted_6.is_empty() {
   67     72   
            let header_value = formatted_6;
   68     73   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   69     74   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   70     75   
                    "status_code",
   71     76   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   72     77   
                )
   73     78   
            })?;
   74     79   
            builder = builder.header("x-amz-fwd-status", header_value);
   75     80   
        }
          81  +
    }
   76     82   
    if let ::std::option::Option::Some(inner_7) = &input.error_code {
   77     83   
        let formatted_8 = inner_7.as_str();
          84  +
        if !formatted_8.is_empty() {
   78     85   
            let header_value = formatted_8;
   79     86   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   80     87   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   81     88   
                    "error_code",
   82     89   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   83     90   
                )
   84     91   
            })?;
   85     92   
            builder = builder.header("x-amz-fwd-error-code", header_value);
   86     93   
        }
          94  +
    }
   87     95   
    if let ::std::option::Option::Some(inner_9) = &input.error_message {
   88     96   
        let formatted_10 = inner_9.as_str();
          97  +
        if !formatted_10.is_empty() {
   89     98   
            let header_value = formatted_10;
   90     99   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   91    100   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   92    101   
                    "error_message",
   93    102   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   94    103   
                )
   95    104   
            })?;
   96    105   
            builder = builder.header("x-amz-fwd-error-message", header_value);
   97    106   
        }
         107  +
    }
   98    108   
    if let ::std::option::Option::Some(inner_11) = &input.accept_ranges {
   99    109   
        let formatted_12 = inner_11.as_str();
         110  +
        if !formatted_12.is_empty() {
  100    111   
            let header_value = formatted_12;
  101    112   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  102    113   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  103    114   
                    "accept_ranges",
  104    115   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  105    116   
                )
  106    117   
            })?;
  107    118   
            builder = builder.header("x-amz-fwd-header-accept-ranges", header_value);
  108    119   
        }
         120  +
    }
  109    121   
    if let ::std::option::Option::Some(inner_13) = &input.cache_control {
  110    122   
        let formatted_14 = inner_13.as_str();
         123  +
        if !formatted_14.is_empty() {
  111    124   
            let header_value = formatted_14;
  112    125   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  113    126   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  114    127   
                    "cache_control",
  115    128   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  116    129   
                )
  117    130   
            })?;
  118    131   
            builder = builder.header("x-amz-fwd-header-Cache-Control", header_value);
  119    132   
        }
         133  +
    }
  120    134   
    if let ::std::option::Option::Some(inner_15) = &input.content_disposition {
  121    135   
        let formatted_16 = inner_15.as_str();
         136  +
        if !formatted_16.is_empty() {
  122    137   
            let header_value = formatted_16;
  123    138   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  124    139   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  125    140   
                    "content_disposition",
  126    141   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  127    142   
                )
  128    143   
            })?;
  129    144   
            builder = builder.header("x-amz-fwd-header-Content-Disposition", header_value);
  130    145   
        }
         146  +
    }
  131    147   
    if let ::std::option::Option::Some(inner_17) = &input.content_encoding {
  132    148   
        let formatted_18 = inner_17.as_str();
         149  +
        if !formatted_18.is_empty() {
  133    150   
            let header_value = formatted_18;
  134    151   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  135    152   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  136    153   
                    "content_encoding",
  137    154   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  138    155   
                )
  139    156   
            })?;
  140    157   
            builder = builder.header("x-amz-fwd-header-Content-Encoding", header_value);
  141    158   
        }
         159  +
    }
  142    160   
    if let ::std::option::Option::Some(inner_19) = &input.content_language {
  143    161   
        let formatted_20 = inner_19.as_str();
         162  +
        if !formatted_20.is_empty() {
  144    163   
            let header_value = formatted_20;
  145    164   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  146    165   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  147    166   
                    "content_language",
  148    167   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  149    168   
                )
  150    169   
            })?;
  151    170   
            builder = builder.header("x-amz-fwd-header-Content-Language", header_value);
  152    171   
        }
         172  +
    }
  153    173   
    if let ::std::option::Option::Some(inner_21) = &input.content_length {
  154    174   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_21);
  155    175   
        let formatted_22 = encoder.encode();
         176  +
        if !formatted_22.is_empty() {
  156    177   
            let header_value = formatted_22;
  157    178   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  158    179   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  159    180   
                    "content_length",
  160    181   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  161    182   
                )
  162    183   
            })?;
  163    184   
            builder = builder.header("Content-Length", header_value);
  164    185   
        }
         186  +
    }
  165    187   
    if let ::std::option::Option::Some(inner_23) = &input.content_range {
  166    188   
        let formatted_24 = inner_23.as_str();
         189  +
        if !formatted_24.is_empty() {
  167    190   
            let header_value = formatted_24;
  168    191   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  169    192   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  170    193   
                    "content_range",
  171    194   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  172    195   
                )
  173    196   
            })?;
  174    197   
            builder = builder.header("x-amz-fwd-header-Content-Range", header_value);
  175    198   
        }
         199  +
    }
  176    200   
    if let ::std::option::Option::Some(inner_25) = &input.content_type {
  177    201   
        let formatted_26 = inner_25.as_str();
         202  +
        if !formatted_26.is_empty() {
  178    203   
            let header_value = formatted_26;
  179    204   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  180    205   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  181    206   
                    "content_type",
  182    207   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  183    208   
                )
  184    209   
            })?;
  185    210   
            builder = builder.header("x-amz-fwd-header-Content-Type", header_value);
  186    211   
        }
         212  +
    }
  187    213   
    if let ::std::option::Option::Some(inner_27) = &input.checksum_crc32 {
  188    214   
        let formatted_28 = inner_27.as_str();
         215  +
        if !formatted_28.is_empty() {
  189    216   
            let header_value = formatted_28;
  190    217   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  191    218   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  192    219   
                    "checksum_crc32",
  193    220   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  194    221   
                )
  195    222   
            })?;
  196    223   
            builder = builder.header("x-amz-fwd-header-x-amz-checksum-crc32", header_value);
  197    224   
        }
         225  +
    }
  198    226   
    if let ::std::option::Option::Some(inner_29) = &input.checksum_crc32_c {
  199    227   
        let formatted_30 = inner_29.as_str();
         228  +
        if !formatted_30.is_empty() {
  200    229   
            let header_value = formatted_30;
  201    230   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  202    231   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  203    232   
                    "checksum_crc32_c",
  204    233   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  205    234   
                )
  206    235   
            })?;
  207    236   
            builder = builder.header("x-amz-fwd-header-x-amz-checksum-crc32c", header_value);
  208    237   
        }
         238  +
    }
  209    239   
    if let ::std::option::Option::Some(inner_31) = &input.checksum_sha1 {
  210    240   
        let formatted_32 = inner_31.as_str();
         241  +
        if !formatted_32.is_empty() {
  211    242   
            let header_value = formatted_32;
  212    243   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  213    244   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  214    245   
                    "checksum_sha1",
  215    246   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  216    247   
                )
  217    248   
            })?;
  218    249   
            builder = builder.header("x-amz-fwd-header-x-amz-checksum-sha1", header_value);
  219    250   
        }
         251  +
    }
  220    252   
    if let ::std::option::Option::Some(inner_33) = &input.checksum_sha256 {
  221    253   
        let formatted_34 = inner_33.as_str();
         254  +
        if !formatted_34.is_empty() {
  222    255   
            let header_value = formatted_34;
  223    256   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  224    257   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  225    258   
                    "checksum_sha256",
  226    259   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  227    260   
                )
  228    261   
            })?;
  229    262   
            builder = builder.header("x-amz-fwd-header-x-amz-checksum-sha256", header_value);
  230    263   
        }
         264  +
    }
  231    265   
    if let ::std::option::Option::Some(inner_35) = &input.delete_marker {
  232    266   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_35);
  233    267   
        let formatted_36 = encoder.encode();
         268  +
        if !formatted_36.is_empty() {
  234    269   
            let header_value = formatted_36;
  235    270   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  236    271   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  237    272   
                    "delete_marker",
  238    273   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  239    274   
                )
  240    275   
            })?;
  241    276   
            builder = builder.header("x-amz-fwd-header-x-amz-delete-marker", header_value);
  242    277   
        }
         278  +
    }
  243    279   
    if let ::std::option::Option::Some(inner_37) = &input.e_tag {
  244    280   
        let formatted_38 = inner_37.as_str();
         281  +
        if !formatted_38.is_empty() {
  245    282   
            let header_value = formatted_38;
  246    283   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  247    284   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  248    285   
                    "e_tag",
  249    286   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  250    287   
                )
  251    288   
            })?;
  252    289   
            builder = builder.header("x-amz-fwd-header-ETag", header_value);
  253    290   
        }
         291  +
    }
  254    292   
    if let ::std::option::Option::Some(inner_39) = &input.expires {
  255    293   
        let formatted_40 = inner_39.fmt(::aws_smithy_types::date_time::Format::HttpDate)?;
         294  +
        if !formatted_40.is_empty() {
  256    295   
            let header_value = formatted_40;
  257    296   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  258    297   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  259    298   
                    "expires",
  260    299   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  261    300   
                )
  262    301   
            })?;
  263    302   
            builder = builder.header("x-amz-fwd-header-Expires", header_value);
  264    303   
        }
         304  +
    }
  265    305   
    if let ::std::option::Option::Some(inner_41) = &input.expiration {
  266    306   
        let formatted_42 = inner_41.as_str();
         307  +
        if !formatted_42.is_empty() {
  267    308   
            let header_value = formatted_42;
  268    309   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  269    310   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  270    311   
                    "expiration",
  271    312   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  272    313   
                )
  273    314   
            })?;
  274    315   
            builder = builder.header("x-amz-fwd-header-x-amz-expiration", header_value);
  275    316   
        }
         317  +
    }
  276    318   
    if let ::std::option::Option::Some(inner_43) = &input.last_modified {
  277    319   
        let formatted_44 = inner_43.fmt(::aws_smithy_types::date_time::Format::HttpDate)?;
         320  +
        if !formatted_44.is_empty() {
  278    321   
            let header_value = formatted_44;
  279    322   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  280    323   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  281    324   
                    "last_modified",
  282    325   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  283    326   
                )
  284    327   
            })?;
  285    328   
            builder = builder.header("x-amz-fwd-header-Last-Modified", header_value);
  286    329   
        }
         330  +
    }
  287    331   
    if let ::std::option::Option::Some(inner_45) = &input.missing_meta {
  288    332   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_45);
  289    333   
        let formatted_46 = encoder.encode();
         334  +
        if !formatted_46.is_empty() {
  290    335   
            let header_value = formatted_46;
  291    336   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  292    337   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  293    338   
                    "missing_meta",
  294    339   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  295    340   
                )
  296    341   
            })?;
  297    342   
            builder = builder.header("x-amz-fwd-header-x-amz-missing-meta", header_value);
  298    343   
        }
         344  +
    }
  299    345   
    if let ::std::option::Option::Some(inner_47) = &input.object_lock_mode {
  300    346   
        let formatted_48 = inner_47.as_str();
         347  +
        if !formatted_48.is_empty() {
  301    348   
            let header_value = formatted_48;
  302    349   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  303    350   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  304    351   
                    "object_lock_mode",
  305    352   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  306    353   
                )
  307    354   
            })?;
  308    355   
            builder = builder.header("x-amz-fwd-header-x-amz-object-lock-mode", header_value);
  309    356   
        }
         357  +
    }
  310    358   
    if let ::std::option::Option::Some(inner_49) = &input.object_lock_legal_hold_status {
  311    359   
        let formatted_50 = inner_49.as_str();
         360  +
        if !formatted_50.is_empty() {
  312    361   
            let header_value = formatted_50;
  313    362   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  314    363   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  315    364   
                    "object_lock_legal_hold_status",
  316    365   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  317    366   
                )
  318    367   
            })?;
  319    368   
            builder = builder.header("x-amz-fwd-header-x-amz-object-lock-legal-hold", header_value);
  320    369   
        }
         370  +
    }
  321    371   
    if let ::std::option::Option::Some(inner_51) = &input.object_lock_retain_until_date {
  322    372   
        let formatted_52 = inner_51.fmt(::aws_smithy_types::date_time::Format::DateTime)?;
         373  +
        if !formatted_52.is_empty() {
  323    374   
            let header_value = formatted_52;
  324    375   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  325    376   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  326    377   
                    "object_lock_retain_until_date",
  327    378   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  328    379   
                )
  329    380   
            })?;
  330    381   
            builder = builder.header("x-amz-fwd-header-x-amz-object-lock-retain-until-date", header_value);
  331    382   
        }
         383  +
    }
  332    384   
    if let ::std::option::Option::Some(inner_53) = &input.parts_count {
  333    385   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_53);
  334    386   
        let formatted_54 = encoder.encode();
         387  +
        if !formatted_54.is_empty() {
  335    388   
            let header_value = formatted_54;
  336    389   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  337    390   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  338    391   
                    "parts_count",
  339    392   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  340    393   
                )
  341    394   
            })?;
  342    395   
            builder = builder.header("x-amz-fwd-header-x-amz-mp-parts-count", header_value);
  343    396   
        }
         397  +
    }
  344    398   
    if let ::std::option::Option::Some(inner_55) = &input.replication_status {
  345    399   
        let formatted_56 = inner_55.as_str();
         400  +
        if !formatted_56.is_empty() {
  346    401   
            let header_value = formatted_56;
  347    402   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  348    403   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  349    404   
                    "replication_status",
  350    405   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  351    406   
                )
  352    407   
            })?;
  353    408   
            builder = builder.header("x-amz-fwd-header-x-amz-replication-status", header_value);
  354    409   
        }
         410  +
    }
  355    411   
    if let ::std::option::Option::Some(inner_57) = &input.request_charged {
  356    412   
        let formatted_58 = inner_57.as_str();
         413  +
        if !formatted_58.is_empty() {
  357    414   
            let header_value = formatted_58;
  358    415   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  359    416   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  360    417   
                    "request_charged",
  361    418   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  362    419   
                )
  363    420   
            })?;
  364    421   
            builder = builder.header("x-amz-fwd-header-x-amz-request-charged", header_value);
  365    422   
        }
         423  +
    }
  366    424   
    if let ::std::option::Option::Some(inner_59) = &input.restore {
  367    425   
        let formatted_60 = inner_59.as_str();
         426  +
        if !formatted_60.is_empty() {
  368    427   
            let header_value = formatted_60;
  369    428   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  370    429   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  371    430   
                    "restore",
  372    431   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  373    432   
                )
  374    433   
            })?;
  375    434   
            builder = builder.header("x-amz-fwd-header-x-amz-restore", header_value);
  376    435   
        }
         436  +
    }
  377    437   
    if let ::std::option::Option::Some(inner_61) = &input.server_side_encryption {
  378    438   
        let formatted_62 = inner_61.as_str();
         439  +
        if !formatted_62.is_empty() {
  379    440   
            let header_value = formatted_62;
  380    441   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  381    442   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  382    443   
                    "server_side_encryption",
  383    444   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  384    445   
                )
  385    446   
            })?;
  386    447   
            builder = builder.header("x-amz-fwd-header-x-amz-server-side-encryption", header_value);
  387    448   
        }
         449  +
    }
  388    450   
    if let ::std::option::Option::Some(inner_63) = &input.sse_customer_algorithm {
  389    451   
        let formatted_64 = inner_63.as_str();
         452  +
        if !formatted_64.is_empty() {
  390    453   
            let header_value = formatted_64;
  391    454   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  392    455   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  393    456   
                    "sse_customer_algorithm",
  394    457   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  395    458   
                )
  396    459   
            })?;
  397    460   
            builder = builder.header("x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm", header_value);
  398    461   
        }
         462  +
    }
  399    463   
    if let ::std::option::Option::Some(inner_65) = &input.ssekms_key_id {
  400    464   
        let formatted_66 = inner_65.as_str();
         465  +
        if !formatted_66.is_empty() {
  401    466   
            let header_value = formatted_66;
  402    467   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  403    468   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  404    469   
                    "ssekms_key_id",
  405    470   
                    format!("`{}` cannot be used as a header value: {}", &"*** Sensitive Data Redacted ***", err),
  406    471   
                )
  407    472   
            })?;
  408    473   
            builder = builder.header("x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id", header_value);
  409    474   
        }
         475  +
    }
  410    476   
    if let ::std::option::Option::Some(inner_67) = &input.sse_customer_key_md5 {
  411    477   
        let formatted_68 = inner_67.as_str();
         478  +
        if !formatted_68.is_empty() {
  412    479   
            let header_value = formatted_68;
  413    480   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  414    481   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  415    482   
                    "sse_customer_key_md5",
  416    483   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  417    484   
                )
  418    485   
            })?;
  419    486   
            builder = builder.header("x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5", header_value);
  420    487   
        }
         488  +
    }
  421    489   
    if let ::std::option::Option::Some(inner_69) = &input.storage_class {
  422    490   
        let formatted_70 = inner_69.as_str();
         491  +
        if !formatted_70.is_empty() {
  423    492   
            let header_value = formatted_70;
  424    493   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  425    494   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  426    495   
                    "storage_class",
  427    496   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  428    497   
                )
  429    498   
            })?;
  430    499   
            builder = builder.header("x-amz-fwd-header-x-amz-storage-class", header_value);
  431    500   
        }
         501  +
    }
  432    502   
    if let ::std::option::Option::Some(inner_71) = &input.tag_count {
  433    503   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_71);
  434    504   
        let formatted_72 = encoder.encode();
         505  +
        if !formatted_72.is_empty() {
  435    506   
            let header_value = formatted_72;
  436    507   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  437    508   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  438    509   
                    "tag_count",
  439    510   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  440    511   
                )
  441    512   
            })?;
  442    513   
            builder = builder.header("x-amz-fwd-header-x-amz-tagging-count", header_value);
  443    514   
        }
         515  +
    }
  444    516   
    if let ::std::option::Option::Some(inner_73) = &input.version_id {
  445    517   
        let formatted_74 = inner_73.as_str();
         518  +
        if !formatted_74.is_empty() {
  446    519   
            let header_value = formatted_74;
  447    520   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  448    521   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  449    522   
                    "version_id",
  450    523   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  451    524   
                )
  452    525   
            })?;
  453    526   
            builder = builder.header("x-amz-fwd-header-x-amz-version-id", header_value);
  454    527   
        }
         528  +
    }
  455    529   
    if let ::std::option::Option::Some(inner_75) = &input.bucket_key_enabled {
  456    530   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_75);
  457    531   
        let formatted_76 = encoder.encode();
         532  +
        if !formatted_76.is_empty() {
  458    533   
            let header_value = formatted_76;
  459    534   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  460    535   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  461    536   
                    "bucket_key_enabled",
  462    537   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  463    538   
                )
  464    539   
            })?;
  465    540   
            builder = builder.header("x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled", header_value);
  466    541   
        }
         542  +
    }
  467    543   
    if let ::std::option::Option::Some(inner_77) = &input.metadata {
  468    544   
        {
  469    545   
            for (k, v) in inner_77 {
  470    546   
                use std::str::FromStr;
  471    547   
                let header_name = http::header::HeaderName::from_str(&format!("{}{}", "x-amz-meta-", &k)).map_err(|err| {
  472    548   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
  473    549   
                        "metadata",
  474    550   
                        format!("`{k}` cannot be used as a header name: {err}"),
  475    551   
                    )
  476    552   
                })?;

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

@@ -51,51 +111,111 @@
   71     71   
[dependencies.regex-lite]
   72     72   
version = "0.1.5"
   73     73   
   74     74   
[dependencies.tracing]
   75     75   
version = "0.1"
   76     76   
   77     77   
[dependencies.url]
   78     78   
version = "2.3.1"
   79     79   
[dev-dependencies.aws-config]
   80     80   
path = "../aws-config"
   81         -
version = "1.5.9"
          81  +
version = "1.5.8"
   82     82   
   83     83   
[dev-dependencies.aws-credential-types]
   84     84   
path = "../aws-credential-types"
   85     85   
features = ["test-util"]
   86     86   
version = "1.2.1"
   87     87   
   88     88   
[dev-dependencies.aws-runtime]
   89     89   
path = "../aws-runtime"
   90     90   
features = ["test-util"]
   91     91   
version = "1.4.3"

tmp-codegen-diff/aws-sdk/sdk/s3control/src/protocol_serde/shape_associate_access_grants_identity_center.rs

@@ -13,13 +70,72 @@
   33     33   
        output.build()
   34     34   
    })
   35     35   
}
   36     36   
   37     37   
pub fn ser_associate_access_grants_identity_center_headers(
   38     38   
    input: &crate::operation::associate_access_grants_identity_center::AssociateAccessGrantsIdentityCenterInput,
   39     39   
    mut builder: ::http::request::Builder,
   40     40   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   41     41   
    if let ::std::option::Option::Some(inner_1) = &input.account_id {
   42     42   
        let formatted_2 = inner_1.as_str();
          43  +
        if !formatted_2.is_empty() {
   43     44   
            let header_value = formatted_2;
   44     45   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   45     46   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   46     47   
                    "account_id",
   47     48   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   48     49   
                )
   49     50   
            })?;
   50     51   
            builder = builder.header("x-amz-account-id", header_value);
   51     52   
        }
          53  +
    }
   52     54   
    Ok(builder)
   53     55   
}
   54     56   
   55     57   
pub fn ser_associate_access_grants_identity_center_op_input(
   56     58   
    input: &crate::operation::associate_access_grants_identity_center::AssociateAccessGrantsIdentityCenterInput,
   57     59   
) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   58     60   
    let mut out = String::new();
   59     61   
    {
   60     62   
        let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
   61     63   
        #[allow(unused_mut)]

tmp-codegen-diff/aws-sdk/sdk/s3control/src/protocol_serde/shape_create_access_grant.rs

@@ -10,10 +78,80 @@
   30     30   
        output.build()
   31     31   
    })
   32     32   
}
   33     33   
   34     34   
pub fn ser_create_access_grant_headers(
   35     35   
    input: &crate::operation::create_access_grant::CreateAccessGrantInput,
   36     36   
    mut builder: ::http::request::Builder,
   37     37   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   38     38   
    if let ::std::option::Option::Some(inner_1) = &input.account_id {
   39     39   
        let formatted_2 = inner_1.as_str();
          40  +
        if !formatted_2.is_empty() {
   40     41   
            let header_value = formatted_2;
   41     42   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   42     43   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   43     44   
                    "account_id",
   44     45   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   45     46   
                )
   46     47   
            })?;
   47     48   
            builder = builder.header("x-amz-account-id", header_value);
   48     49   
        }
          50  +
    }
   49     51   
    Ok(builder)
   50     52   
}
   51     53   
   52     54   
pub fn ser_create_access_grant_op_input(
   53     55   
    input: &crate::operation::create_access_grant::CreateAccessGrantInput,
   54     56   
) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   55     57   
    let mut out = String::new();
   56     58   
    {
   57     59   
        let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
   58     60   
        #[allow(unused_mut)]

tmp-codegen-diff/aws-sdk/sdk/s3control/src/protocol_serde/shape_create_access_grants_instance.rs

@@ -16,16 +84,86 @@
   36     36   
        output.build()
   37     37   
    })
   38     38   
}
   39     39   
   40     40   
pub fn ser_create_access_grants_instance_headers(
   41     41   
    input: &crate::operation::create_access_grants_instance::CreateAccessGrantsInstanceInput,
   42     42   
    mut builder: ::http::request::Builder,
   43     43   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   44     44   
    if let ::std::option::Option::Some(inner_1) = &input.account_id {
   45     45   
        let formatted_2 = inner_1.as_str();
          46  +
        if !formatted_2.is_empty() {
   46     47   
            let header_value = formatted_2;
   47     48   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   48     49   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   49     50   
                    "account_id",
   50     51   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   51     52   
                )
   52     53   
            })?;
   53     54   
            builder = builder.header("x-amz-account-id", header_value);
   54     55   
        }
          56  +
    }
   55     57   
    Ok(builder)
   56     58   
}
   57     59   
   58     60   
pub fn ser_create_access_grants_instance_op_input(
   59     61   
    input: &crate::operation::create_access_grants_instance::CreateAccessGrantsInstanceInput,
   60     62   
) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   61     63   
    let mut out = String::new();
   62     64   
    {
   63     65   
        let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
   64     66   
        #[allow(unused_mut)]

tmp-codegen-diff/aws-sdk/sdk/s3control/src/protocol_serde/shape_create_access_grants_location.rs

@@ -16,16 +84,86 @@
   36     36   
        output.build()
   37     37   
    })
   38     38   
}
   39     39   
   40     40   
pub fn ser_create_access_grants_location_headers(
   41     41   
    input: &crate::operation::create_access_grants_location::CreateAccessGrantsLocationInput,
   42     42   
    mut builder: ::http::request::Builder,
   43     43   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   44     44   
    if let ::std::option::Option::Some(inner_1) = &input.account_id {
   45     45   
        let formatted_2 = inner_1.as_str();
          46  +
        if !formatted_2.is_empty() {
   46     47   
            let header_value = formatted_2;
   47     48   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   48     49   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   49     50   
                    "account_id",
   50     51   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   51     52   
                )
   52     53   
            })?;
   53     54   
            builder = builder.header("x-amz-account-id", header_value);
   54     55   
        }
          56  +
    }
   55     57   
    Ok(builder)
   56     58   
}
   57     59   
   58     60   
pub fn ser_create_access_grants_location_op_input(
   59     61   
    input: &crate::operation::create_access_grants_location::CreateAccessGrantsLocationInput,
   60     62   
) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   61     63   
    let mut out = String::new();
   62     64   
    {
   63     65   
        let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
   64     66   
        #[allow(unused_mut)]

tmp-codegen-diff/aws-sdk/sdk/s3control/src/protocol_serde/shape_create_access_point.rs

@@ -10,10 +78,80 @@
   30     30   
        output.build()
   31     31   
    })
   32     32   
}
   33     33   
   34     34   
pub fn ser_create_access_point_headers(
   35     35   
    input: &crate::operation::create_access_point::CreateAccessPointInput,
   36     36   
    mut builder: ::http::request::Builder,
   37     37   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   38     38   
    if let ::std::option::Option::Some(inner_1) = &input.account_id {
   39     39   
        let formatted_2 = inner_1.as_str();
          40  +
        if !formatted_2.is_empty() {
   40     41   
            let header_value = formatted_2;
   41     42   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   42     43   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   43     44   
                    "account_id",
   44     45   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   45     46   
                )
   46     47   
            })?;
   47     48   
            builder = builder.header("x-amz-account-id", header_value);
   48     49   
        }
          50  +
    }
   49     51   
    Ok(builder)
   50     52   
}
   51     53   
   52     54   
pub fn ser_create_access_point_op_input(
   53     55   
    input: &crate::operation::create_access_point::CreateAccessPointInput,
   54     56   
) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   55     57   
    let mut out = String::new();
   56     58   
    {
   57     59   
        let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
   58     60   
        #[allow(unused_mut)]

tmp-codegen-diff/aws-sdk/sdk/s3control/src/protocol_serde/shape_create_access_point_for_object_lambda.rs

@@ -14,14 +82,84 @@
   34     34   
        output.build()
   35     35   
    })
   36     36   
}
   37     37   
   38     38   
pub fn ser_create_access_point_for_object_lambda_headers(
   39     39   
    input: &crate::operation::create_access_point_for_object_lambda::CreateAccessPointForObjectLambdaInput,
   40     40   
    mut builder: ::http::request::Builder,
   41     41   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   42     42   
    if let ::std::option::Option::Some(inner_1) = &input.account_id {
   43     43   
        let formatted_2 = inner_1.as_str();
          44  +
        if !formatted_2.is_empty() {
   44     45   
            let header_value = formatted_2;
   45     46   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   46     47   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   47     48   
                    "account_id",
   48     49   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   49     50   
                )
   50     51   
            })?;
   51     52   
            builder = builder.header("x-amz-account-id", header_value);
   52     53   
        }
          54  +
    }
   53     55   
    Ok(builder)
   54     56   
}
   55     57   
   56     58   
pub fn ser_create_access_point_for_object_lambda_op_input(
   57     59   
    input: &crate::operation::create_access_point_for_object_lambda::CreateAccessPointForObjectLambdaInput,
   58     60   
) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   59     61   
    let mut out = String::new();
   60     62   
    {
   61     63   
        let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
   62     64   
        #[allow(unused_mut)]

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

@@ -50,50 +196,212 @@
   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.outpost_id {
  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   
                    "outpost_id",
  162    177   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  163    178   
                )
  164    179   
            })?;
  165    180   
            builder = builder.header("x-amz-outpost-id", header_value);
  166    181   
        }
         182  +
    }
  167    183   
    Ok(builder)
  168    184   
}
  169    185   
  170    186   
#[allow(unused_mut)]
  171    187   
pub fn de_create_bucket(
  172    188   
    inp: &[u8],
  173    189   
    mut builder: crate::operation::create_bucket::builders::CreateBucketOutputBuilder,
  174    190   
) -> Result<crate::operation::create_bucket::builders::CreateBucketOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
  175    191   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
  176    192   

tmp-codegen-diff/aws-sdk/sdk/s3control/src/protocol_serde/shape_create_job.rs

@@ -76,76 +144,146 @@
   96     96   
        output.build()
   97     97   
    })
   98     98   
}
   99     99   
  100    100   
pub fn ser_create_job_headers(
  101    101   
    input: &crate::operation::create_job::CreateJobInput,
  102    102   
    mut builder: ::http::request::Builder,
  103    103   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  104    104   
    if let ::std::option::Option::Some(inner_1) = &input.account_id {
  105    105   
        let formatted_2 = inner_1.as_str();
         106  +
        if !formatted_2.is_empty() {
  106    107   
            let header_value = formatted_2;
  107    108   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  108    109   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  109    110   
                    "account_id",
  110    111   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  111    112   
                )
  112    113   
            })?;
  113    114   
            builder = builder.header("x-amz-account-id", header_value);
  114    115   
        }
         116  +
    }
  115    117   
    Ok(builder)
  116    118   
}
  117    119   
  118    120   
pub fn ser_create_job_op_input(
  119    121   
    input: &crate::operation::create_job::CreateJobInput,
  120    122   
) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  121    123   
    let mut out = String::new();
  122    124   
    {
  123    125   
        let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
  124    126   
        #[allow(unused_mut)]

tmp-codegen-diff/aws-sdk/sdk/s3control/src/protocol_serde/shape_create_multi_region_access_point.rs

@@ -14,14 +82,84 @@
   34     34   
        output.build()
   35     35   
    })
   36     36   
}
   37     37   
   38     38   
pub fn ser_create_multi_region_access_point_headers(
   39     39   
    input: &crate::operation::create_multi_region_access_point::CreateMultiRegionAccessPointInput,
   40     40   
    mut builder: ::http::request::Builder,
   41     41   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   42     42   
    if let ::std::option::Option::Some(inner_1) = &input.account_id {
   43     43   
        let formatted_2 = inner_1.as_str();
          44  +
        if !formatted_2.is_empty() {
   44     45   
            let header_value = formatted_2;
   45     46   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   46     47   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   47     48   
                    "account_id",
   48     49   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   49     50   
                )
   50     51   
            })?;
   51     52   
            builder = builder.header("x-amz-account-id", header_value);
   52     53   
        }
          54  +
    }
   53     55   
    Ok(builder)
   54     56   
}
   55     57   
   56     58   
pub fn ser_create_multi_region_access_point_op_input(
   57     59   
    input: &crate::operation::create_multi_region_access_point::CreateMultiRegionAccessPointInput,
   58     60   
) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   59     61   
    let mut out = String::new();
   60     62   
    {
   61     63   
        let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
   62     64   
        #[allow(unused_mut)]

tmp-codegen-diff/aws-sdk/sdk/s3control/src/protocol_serde/shape_create_storage_lens_group.rs

@@ -12,12 +67,69 @@
   32     32   
        output.build()
   33     33   
    })
   34     34   
}
   35     35   
   36     36   
pub fn ser_create_storage_lens_group_headers(
   37     37   
    input: &crate::operation::create_storage_lens_group::CreateStorageLensGroupInput,
   38     38   
    mut builder: ::http::request::Builder,
   39     39   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   40     40   
    if let ::std::option::Option::Some(inner_1) = &input.account_id {
   41     41   
        let formatted_2 = inner_1.as_str();
          42  +
        if !formatted_2.is_empty() {
   42     43   
            let header_value = formatted_2;
   43     44   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   44     45   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   45     46   
                    "account_id",
   46     47   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   47     48   
                )
   48     49   
            })?;
   49     50   
            builder = builder.header("x-amz-account-id", header_value);
   50     51   
        }
          52  +
    }
   51     53   
    Ok(builder)
   52     54   
}
   53     55   
   54     56   
pub fn ser_create_storage_lens_group_op_input(
   55     57   
    input: &crate::operation::create_storage_lens_group::CreateStorageLensGroupInput,
   56     58   
) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   57     59   
    let mut out = String::new();
   58     60   
    {
   59     61   
        let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
   60     62   
        #[allow(unused_mut)]

tmp-codegen-diff/aws-sdk/sdk/s3control/src/protocol_serde/shape_delete_access_grant.rs

@@ -8,8 +48,50 @@
   28     28   
        output.build()
   29     29   
    })
   30     30   
}
   31     31   
   32     32   
pub fn ser_delete_access_grant_headers(
   33     33   
    input: &crate::operation::delete_access_grant::DeleteAccessGrantInput,
   34     34   
    mut builder: ::http::request::Builder,
   35     35   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   36     36   
    if let ::std::option::Option::Some(inner_1) = &input.account_id {
   37     37   
        let formatted_2 = inner_1.as_str();
          38  +
        if !formatted_2.is_empty() {
   38     39   
            let header_value = formatted_2;
   39     40   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   40     41   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   41     42   
                    "account_id",
   42     43   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   43     44   
                )
   44     45   
            })?;
   45     46   
            builder = builder.header("x-amz-account-id", header_value);
   46     47   
        }
          48  +
    }
   47     49   
    Ok(builder)
   48     50   
}