AWS SDK

AWS SDK

rev. a7fb2e3446d314cfbe48069306e4e0a389b39aeb

Files changed:

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

@@ -17,17 +57,59 @@
   37     37   
        output.build()
   38     38   
    })
   39     39   
}
   40     40   
   41     41   
pub fn ser_get_bucket_policy_status_headers(
   42     42   
    input: &crate::operation::get_bucket_policy_status::GetBucketPolicyStatusInput,
   43     43   
    mut builder: ::http::request::Builder,
   44     44   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   45     45   
    if let ::std::option::Option::Some(inner_1) = &input.expected_bucket_owner {
   46     46   
        let formatted_2 = inner_1.as_str();
   47         -
        let header_value = formatted_2;
   48         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   49         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   50         -
                "expected_bucket_owner",
   51         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   52         -
            )
   53         -
        })?;
   54         -
        builder = builder.header("x-amz-expected-bucket-owner", header_value);
          47  +
        if !formatted_2.is_empty() {
          48  +
            let header_value = formatted_2;
          49  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          50  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          51  +
                    "expected_bucket_owner",
          52  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          53  +
                )
          54  +
            })?;
          55  +
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
          56  +
        }
   55     57   
    }
   56     58   
    Ok(builder)
   57     59   
}

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

@@ -17,17 +57,59 @@
   37     37   
        output.build()
   38     38   
    })
   39     39   
}
   40     40   
   41     41   
pub fn ser_get_bucket_replication_headers(
   42     42   
    input: &crate::operation::get_bucket_replication::GetBucketReplicationInput,
   43     43   
    mut builder: ::http::request::Builder,
   44     44   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   45     45   
    if let ::std::option::Option::Some(inner_1) = &input.expected_bucket_owner {
   46     46   
        let formatted_2 = inner_1.as_str();
   47         -
        let header_value = formatted_2;
   48         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   49         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   50         -
                "expected_bucket_owner",
   51         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   52         -
            )
   53         -
        })?;
   54         -
        builder = builder.header("x-amz-expected-bucket-owner", header_value);
          47  +
        if !formatted_2.is_empty() {
          48  +
            let header_value = formatted_2;
          49  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          50  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          51  +
                    "expected_bucket_owner",
          52  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          53  +
                )
          54  +
            })?;
          55  +
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
          56  +
        }
   55     57   
    }
   56     58   
    Ok(builder)
   57     59   
}

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

@@ -18,18 +85,87 @@
   38     38   
        output.build()
   39     39   
    })
   40     40   
}
   41     41   
   42     42   
pub fn ser_get_bucket_request_payment_headers(
   43     43   
    input: &crate::operation::get_bucket_request_payment::GetBucketRequestPaymentInput,
   44     44   
    mut builder: ::http::request::Builder,
   45     45   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   46     46   
    if let ::std::option::Option::Some(inner_1) = &input.expected_bucket_owner {
   47     47   
        let formatted_2 = inner_1.as_str();
   48         -
        let header_value = formatted_2;
   49         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   50         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   51         -
                "expected_bucket_owner",
   52         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   53         -
            )
   54         -
        })?;
   55         -
        builder = builder.header("x-amz-expected-bucket-owner", header_value);
          48  +
        if !formatted_2.is_empty() {
          49  +
            let header_value = formatted_2;
          50  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          51  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          52  +
                    "expected_bucket_owner",
          53  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          54  +
                )
          55  +
            })?;
          56  +
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
          57  +
        }
   56     58   
    }
   57     59   
    Ok(builder)
   58     60   
}
   59     61   
   60     62   
#[allow(unused_mut)]
   61     63   
pub fn de_get_bucket_request_payment(
   62     64   
    inp: &[u8],
   63     65   
    mut builder: crate::operation::get_bucket_request_payment::builders::GetBucketRequestPaymentOutputBuilder,
   64     66   
) -> Result<crate::operation::get_bucket_request_payment::builders::GetBucketRequestPaymentOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
   65     67   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;

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

@@ -12,12 +79,81 @@
   32     32   
            .map_err(crate::operation::get_bucket_tagging::GetBucketTaggingError::unhandled)?
   33     33   
    })
   34     34   
}
   35     35   
   36     36   
pub fn ser_get_bucket_tagging_headers(
   37     37   
    input: &crate::operation::get_bucket_tagging::GetBucketTaggingInput,
   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.expected_bucket_owner {
   41     41   
        let formatted_2 = inner_1.as_str();
   42         -
        let header_value = formatted_2;
   43         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   44         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   45         -
                "expected_bucket_owner",
   46         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   47         -
            )
   48         -
        })?;
   49         -
        builder = builder.header("x-amz-expected-bucket-owner", header_value);
          42  +
        if !formatted_2.is_empty() {
          43  +
            let header_value = formatted_2;
          44  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          45  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          46  +
                    "expected_bucket_owner",
          47  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          48  +
                )
          49  +
            })?;
          50  +
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
          51  +
        }
   50     52   
    }
   51     53   
    Ok(builder)
   52     54   
}
   53     55   
   54     56   
#[allow(unused_mut)]
   55     57   
pub fn de_get_bucket_tagging(
   56     58   
    inp: &[u8],
   57     59   
    mut builder: crate::operation::get_bucket_tagging::builders::GetBucketTaggingOutputBuilder,
   58     60   
) -> Result<crate::operation::get_bucket_tagging::builders::GetBucketTaggingOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
   59     61   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;

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

@@ -16,16 +83,85 @@
   36     36   
        output.build()
   37     37   
    })
   38     38   
}
   39     39   
   40     40   
pub fn ser_get_bucket_versioning_headers(
   41     41   
    input: &crate::operation::get_bucket_versioning::GetBucketVersioningInput,
   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.expected_bucket_owner {
   45     45   
        let formatted_2 = inner_1.as_str();
   46         -
        let header_value = formatted_2;
   47         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   48         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   49         -
                "expected_bucket_owner",
   50         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   51         -
            )
   52         -
        })?;
   53         -
        builder = builder.header("x-amz-expected-bucket-owner", header_value);
          46  +
        if !formatted_2.is_empty() {
          47  +
            let header_value = formatted_2;
          48  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          49  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          50  +
                    "expected_bucket_owner",
          51  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          52  +
                )
          53  +
            })?;
          54  +
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
          55  +
        }
   54     56   
    }
   55     57   
    Ok(builder)
   56     58   
}
   57     59   
   58     60   
#[allow(unused_mut)]
   59     61   
pub fn de_get_bucket_versioning(
   60     62   
    inp: &[u8],
   61     63   
    mut builder: crate::operation::get_bucket_versioning::builders::GetBucketVersioningOutputBuilder,
   62     64   
) -> Result<crate::operation::get_bucket_versioning::builders::GetBucketVersioningOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
   63     65   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;

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

@@ -10,10 +77,79 @@
   30     30   
        output.build()
   31     31   
    })
   32     32   
}
   33     33   
   34     34   
pub fn ser_get_bucket_website_headers(
   35     35   
    input: &crate::operation::get_bucket_website::GetBucketWebsiteInput,
   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.expected_bucket_owner {
   39     39   
        let formatted_2 = inner_1.as_str();
   40         -
        let header_value = formatted_2;
   41         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   42         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   43         -
                "expected_bucket_owner",
   44         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   45         -
            )
   46         -
        })?;
   47         -
        builder = builder.header("x-amz-expected-bucket-owner", header_value);
          40  +
        if !formatted_2.is_empty() {
          41  +
            let header_value = formatted_2;
          42  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          43  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          44  +
                    "expected_bucket_owner",
          45  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          46  +
                )
          47  +
            })?;
          48  +
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
          49  +
        }
   48     50   
    }
   49     51   
    Ok(builder)
   50     52   
}
   51     53   
   52     54   
#[allow(unused_mut)]
   53     55   
pub fn de_get_bucket_website(
   54     56   
    inp: &[u8],
   55     57   
    mut builder: crate::operation::get_bucket_website::builders::GetBucketWebsiteOutputBuilder,
   56     58   
) -> Result<crate::operation::get_bucket_website::builders::GetBucketWebsiteOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
   57     59   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;

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

@@ -233,233 +383,405 @@
  253    253   
        _ => crate::operation::get_object::GetObjectError::generic(generic),
  254    254   
    })
  255    255   
}
  256    256   
  257    257   
pub fn ser_get_object_headers(
  258    258   
    input: &crate::operation::get_object::GetObjectInput,
  259    259   
    mut builder: ::http::request::Builder,
  260    260   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  261    261   
    if let ::std::option::Option::Some(inner_1) = &input.if_match {
  262    262   
        let formatted_2 = inner_1.as_str();
  263         -
        let header_value = formatted_2;
  264         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  265         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  266         -
                "if_match",
  267         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  268         -
            )
  269         -
        })?;
  270         -
        builder = builder.header("If-Match", header_value);
         263  +
        if !formatted_2.is_empty() {
         264  +
            let header_value = formatted_2;
         265  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         266  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         267  +
                    "if_match",
         268  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         269  +
                )
         270  +
            })?;
         271  +
            builder = builder.header("If-Match", header_value);
         272  +
        }
  271    273   
    }
  272    274   
    if let ::std::option::Option::Some(inner_3) = &input.if_modified_since {
  273    275   
        let formatted_4 = inner_3.fmt(::aws_smithy_types::date_time::Format::HttpDate)?;
  274         -
        let header_value = formatted_4;
  275         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  276         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  277         -
                "if_modified_since",
  278         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  279         -
            )
  280         -
        })?;
  281         -
        builder = builder.header("If-Modified-Since", header_value);
         276  +
        if !formatted_4.is_empty() {
         277  +
            let header_value = formatted_4;
         278  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         279  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         280  +
                    "if_modified_since",
         281  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         282  +
                )
         283  +
            })?;
         284  +
            builder = builder.header("If-Modified-Since", header_value);
         285  +
        }
  282    286   
    }
  283    287   
    if let ::std::option::Option::Some(inner_5) = &input.if_none_match {
  284    288   
        let formatted_6 = inner_5.as_str();
  285         -
        let header_value = formatted_6;
  286         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  287         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  288         -
                "if_none_match",
  289         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  290         -
            )
  291         -
        })?;
  292         -
        builder = builder.header("If-None-Match", header_value);
         289  +
        if !formatted_6.is_empty() {
         290  +
            let header_value = formatted_6;
         291  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         292  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         293  +
                    "if_none_match",
         294  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         295  +
                )
         296  +
            })?;
         297  +
            builder = builder.header("If-None-Match", header_value);
         298  +
        }
  293    299   
    }
  294    300   
    if let ::std::option::Option::Some(inner_7) = &input.if_unmodified_since {
  295    301   
        let formatted_8 = inner_7.fmt(::aws_smithy_types::date_time::Format::HttpDate)?;
  296         -
        let header_value = formatted_8;
  297         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  298         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  299         -
                "if_unmodified_since",
  300         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  301         -
            )
  302         -
        })?;
  303         -
        builder = builder.header("If-Unmodified-Since", header_value);
         302  +
        if !formatted_8.is_empty() {
         303  +
            let header_value = formatted_8;
         304  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         305  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         306  +
                    "if_unmodified_since",
         307  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         308  +
                )
         309  +
            })?;
         310  +
            builder = builder.header("If-Unmodified-Since", header_value);
         311  +
        }
  304    312   
    }
  305    313   
    if let ::std::option::Option::Some(inner_9) = &input.range {
  306    314   
        let formatted_10 = inner_9.as_str();
  307         -
        let header_value = formatted_10;
  308         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  309         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  310         -
                "range",
  311         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  312         -
            )
  313         -
        })?;
  314         -
        builder = builder.header("Range", header_value);
         315  +
        if !formatted_10.is_empty() {
         316  +
            let header_value = formatted_10;
         317  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         318  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         319  +
                    "range",
         320  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         321  +
                )
         322  +
            })?;
         323  +
            builder = builder.header("Range", header_value);
         324  +
        }
  315    325   
    }
  316    326   
    if let ::std::option::Option::Some(inner_11) = &input.sse_customer_algorithm {
  317    327   
        let formatted_12 = inner_11.as_str();
  318         -
        let header_value = formatted_12;
  319         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  320         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  321         -
                "sse_customer_algorithm",
  322         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  323         -
            )
  324         -
        })?;
  325         -
        builder = builder.header("x-amz-server-side-encryption-customer-algorithm", header_value);
         328  +
        if !formatted_12.is_empty() {
         329  +
            let header_value = formatted_12;
         330  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         331  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         332  +
                    "sse_customer_algorithm",
         333  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         334  +
                )
         335  +
            })?;
         336  +
            builder = builder.header("x-amz-server-side-encryption-customer-algorithm", header_value);
         337  +
        }
  326    338   
    }
  327    339   
    if let ::std::option::Option::Some(inner_13) = &input.sse_customer_key {
  328    340   
        let formatted_14 = inner_13.as_str();
  329         -
        let header_value = formatted_14;
  330         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  331         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  332         -
                "sse_customer_key",
  333         -
                format!("`{}` cannot be used as a header value: {}", &"*** Sensitive Data Redacted ***", err),
  334         -
            )
  335         -
        })?;
  336         -
        builder = builder.header("x-amz-server-side-encryption-customer-key", header_value);
         341  +
        if !formatted_14.is_empty() {
         342  +
            let header_value = formatted_14;
         343  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         344  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         345  +
                    "sse_customer_key",
         346  +
                    format!("`{}` cannot be used as a header value: {}", &"*** Sensitive Data Redacted ***", err),
         347  +
                )
         348  +
            })?;
         349  +
            builder = builder.header("x-amz-server-side-encryption-customer-key", header_value);
         350  +
        }
  337    351   
    }
  338    352   
    if let ::std::option::Option::Some(inner_15) = &input.sse_customer_key_md5 {
  339    353   
        let formatted_16 = inner_15.as_str();
  340         -
        let header_value = formatted_16;
  341         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  342         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  343         -
                "sse_customer_key_md5",
  344         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  345         -
            )
  346         -
        })?;
  347         -
        builder = builder.header("x-amz-server-side-encryption-customer-key-MD5", header_value);
         354  +
        if !formatted_16.is_empty() {
         355  +
            let header_value = formatted_16;
         356  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         357  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         358  +
                    "sse_customer_key_md5",
         359  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         360  +
                )
         361  +
            })?;
         362  +
            builder = builder.header("x-amz-server-side-encryption-customer-key-MD5", header_value);
         363  +
        }
  348    364   
    }
  349    365   
    if let ::std::option::Option::Some(inner_17) = &input.request_payer {
  350    366   
        let formatted_18 = inner_17.as_str();
  351         -
        let header_value = formatted_18;
  352         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  353         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  354         -
                "request_payer",
  355         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  356         -
            )
  357         -
        })?;
  358         -
        builder = builder.header("x-amz-request-payer", header_value);
         367  +
        if !formatted_18.is_empty() {
         368  +
            let header_value = formatted_18;
         369  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         370  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         371  +
                    "request_payer",
         372  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         373  +
                )
         374  +
            })?;
         375  +
            builder = builder.header("x-amz-request-payer", header_value);
         376  +
        }
  359    377   
    }
  360    378   
    if let ::std::option::Option::Some(inner_19) = &input.expected_bucket_owner {
  361    379   
        let formatted_20 = inner_19.as_str();
  362         -
        let header_value = formatted_20;
  363         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  364         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  365         -
                "expected_bucket_owner",
  366         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  367         -
            )
  368         -
        })?;
  369         -
        builder = builder.header("x-amz-expected-bucket-owner", header_value);
         380  +
        if !formatted_20.is_empty() {
         381  +
            let header_value = formatted_20;
         382  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         383  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         384  +
                    "expected_bucket_owner",
         385  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         386  +
                )
         387  +
            })?;
         388  +
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
         389  +
        }
  370    390   
    }
  371    391   
    if let ::std::option::Option::Some(inner_21) = &input.checksum_mode {
  372    392   
        let formatted_22 = inner_21.as_str();
  373         -
        let header_value = formatted_22;
  374         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  375         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  376         -
                "checksum_mode",
  377         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  378         -
            )
  379         -
        })?;
  380         -
        builder = builder.header("x-amz-checksum-mode", header_value);
         393  +
        if !formatted_22.is_empty() {
         394  +
            let header_value = formatted_22;
         395  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         396  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         397  +
                    "checksum_mode",
         398  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         399  +
                )
         400  +
            })?;
         401  +
            builder = builder.header("x-amz-checksum-mode", header_value);
         402  +
        }
  381    403   
    }
  382    404   
    Ok(builder)
  383    405   
}

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

@@ -38,38 +116,120 @@
   58     58   
        output.build()
   59     59   
    })
   60     60   
}
   61     61   
   62     62   
pub fn ser_get_object_acl_headers(
   63     63   
    input: &crate::operation::get_object_acl::GetObjectAclInput,
   64     64   
    mut builder: ::http::request::Builder,
   65     65   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   66     66   
    if let ::std::option::Option::Some(inner_1) = &input.request_payer {
   67     67   
        let formatted_2 = inner_1.as_str();
   68         -
        let header_value = formatted_2;
   69         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   70         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   71         -
                "request_payer",
   72         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   73         -
            )
   74         -
        })?;
   75         -
        builder = builder.header("x-amz-request-payer", header_value);
          68  +
        if !formatted_2.is_empty() {
          69  +
            let header_value = formatted_2;
          70  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          71  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          72  +
                    "request_payer",
          73  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          74  +
                )
          75  +
            })?;
          76  +
            builder = builder.header("x-amz-request-payer", header_value);
          77  +
        }
   76     78   
    }
   77     79   
    if let ::std::option::Option::Some(inner_3) = &input.expected_bucket_owner {
   78     80   
        let formatted_4 = inner_3.as_str();
   79         -
        let header_value = formatted_4;
   80         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   81         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   82         -
                "expected_bucket_owner",
   83         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   84         -
            )
   85         -
        })?;
   86         -
        builder = builder.header("x-amz-expected-bucket-owner", header_value);
          81  +
        if !formatted_4.is_empty() {
          82  +
            let header_value = formatted_4;
          83  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          84  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          85  +
                    "expected_bucket_owner",
          86  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          87  +
                )
          88  +
            })?;
          89  +
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
          90  +
        }
   87     91   
    }
   88     92   
    Ok(builder)
   89     93   
}
   90     94   
   91     95   
#[allow(unused_mut)]
   92     96   
pub fn de_get_object_acl(
   93     97   
    inp: &[u8],
   94     98   
    mut builder: crate::operation::get_object_acl::builders::GetObjectAclOutputBuilder,
   95     99   
) -> Result<crate::operation::get_object_acl::builders::GetObjectAclOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
   96    100   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;

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

@@ -68,68 +209,220 @@
   88     88   
    })
   89     89   
}
   90     90   
   91     91   
pub fn ser_get_object_attributes_headers(
   92     92   
    input: &crate::operation::get_object_attributes::GetObjectAttributesInput,
   93     93   
    mut builder: ::http::request::Builder,
   94     94   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   95     95   
    if let ::std::option::Option::Some(inner_1) = &input.max_parts {
   96     96   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_1);
   97     97   
        let formatted_2 = encoder.encode();
   98         -
        let header_value = formatted_2;
   99         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  100         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  101         -
                "max_parts",
  102         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  103         -
            )
  104         -
        })?;
  105         -
        builder = builder.header("x-amz-max-parts", header_value);
          98  +
        if !formatted_2.is_empty() {
          99  +
            let header_value = formatted_2;
         100  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         101  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         102  +
                    "max_parts",
         103  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         104  +
                )
         105  +
            })?;
         106  +
            builder = builder.header("x-amz-max-parts", header_value);
         107  +
        }
  106    108   
    }
  107    109   
    if let ::std::option::Option::Some(inner_3) = &input.part_number_marker {
  108    110   
        let formatted_4 = inner_3.as_str();
  109         -
        let header_value = formatted_4;
  110         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  111         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  112         -
                "part_number_marker",
  113         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  114         -
            )
  115         -
        })?;
  116         -
        builder = builder.header("x-amz-part-number-marker", header_value);
         111  +
        if !formatted_4.is_empty() {
         112  +
            let header_value = formatted_4;
         113  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         114  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         115  +
                    "part_number_marker",
         116  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         117  +
                )
         118  +
            })?;
         119  +
            builder = builder.header("x-amz-part-number-marker", header_value);
         120  +
        }
  117    121   
    }
  118    122   
    if let ::std::option::Option::Some(inner_5) = &input.sse_customer_algorithm {
  119    123   
        let formatted_6 = inner_5.as_str();
  120         -
        let header_value = formatted_6;
  121         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  122         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  123         -
                "sse_customer_algorithm",
  124         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  125         -
            )
  126         -
        })?;
  127         -
        builder = builder.header("x-amz-server-side-encryption-customer-algorithm", header_value);
         124  +
        if !formatted_6.is_empty() {
         125  +
            let header_value = formatted_6;
         126  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         127  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         128  +
                    "sse_customer_algorithm",
         129  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         130  +
                )
         131  +
            })?;
         132  +
            builder = builder.header("x-amz-server-side-encryption-customer-algorithm", header_value);
         133  +
        }
  128    134   
    }
  129    135   
    if let ::std::option::Option::Some(inner_7) = &input.sse_customer_key {
  130    136   
        let formatted_8 = inner_7.as_str();
  131         -
        let header_value = formatted_8;
  132         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  133         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  134         -
                "sse_customer_key",
  135         -
                format!("`{}` cannot be used as a header value: {}", &"*** Sensitive Data Redacted ***", err),
  136         -
            )
  137         -
        })?;
  138         -
        builder = builder.header("x-amz-server-side-encryption-customer-key", header_value);
         137  +
        if !formatted_8.is_empty() {
         138  +
            let header_value = formatted_8;
         139  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         140  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         141  +
                    "sse_customer_key",
         142  +
                    format!("`{}` cannot be used as a header value: {}", &"*** Sensitive Data Redacted ***", err),
         143  +
                )
         144  +
            })?;
         145  +
            builder = builder.header("x-amz-server-side-encryption-customer-key", header_value);
         146  +
        }
  139    147   
    }
  140    148   
    if let ::std::option::Option::Some(inner_9) = &input.sse_customer_key_md5 {
  141    149   
        let formatted_10 = inner_9.as_str();
  142         -
        let header_value = formatted_10;
  143         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  144         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  145         -
                "sse_customer_key_md5",
  146         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  147         -
            )
  148         -
        })?;
  149         -
        builder = builder.header("x-amz-server-side-encryption-customer-key-MD5", header_value);
         150  +
        if !formatted_10.is_empty() {
         151  +
            let header_value = formatted_10;
         152  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         153  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         154  +
                    "sse_customer_key_md5",
         155  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         156  +
                )
         157  +
            })?;
         158  +
            builder = builder.header("x-amz-server-side-encryption-customer-key-MD5", header_value);
         159  +
        }
  150    160   
    }
  151    161   
    if let ::std::option::Option::Some(inner_11) = &input.request_payer {
  152    162   
        let formatted_12 = inner_11.as_str();
  153         -
        let header_value = formatted_12;
  154         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  155         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  156         -
                "request_payer",
  157         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  158         -
            )
  159         -
        })?;
  160         -
        builder = builder.header("x-amz-request-payer", header_value);
         163  +
        if !formatted_12.is_empty() {
         164  +
            let header_value = formatted_12;
         165  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         166  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         167  +
                    "request_payer",
         168  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         169  +
                )
         170  +
            })?;
         171  +
            builder = builder.header("x-amz-request-payer", header_value);
         172  +
        }
  161    173   
    }
  162    174   
    if let ::std::option::Option::Some(inner_13) = &input.expected_bucket_owner {
  163    175   
        let formatted_14 = inner_13.as_str();
  164         -
        let header_value = formatted_14;
  165         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  166         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  167         -
                "expected_bucket_owner",
  168         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  169         -
            )
  170         -
        })?;
  171         -
        builder = builder.header("x-amz-expected-bucket-owner", header_value);
         176  +
        if !formatted_14.is_empty() {
         177  +
            let header_value = formatted_14;
         178  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         179  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         180  +
                    "expected_bucket_owner",
         181  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         182  +
                )
         183  +
            })?;
         184  +
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
         185  +
        }
  172    186   
    }
  173    187   
    if let ::std::option::Option::Some(inner_15) = &input.object_attributes {
  174         -
        // Empty vec in header is serialized as an empty string
  175         -
        if inner_15.is_empty() {
  176         -
            builder = builder.header("x-amz-object-attributes", "");
  177         -
        } else {
  178         -
            for inner_16 in inner_15 {
  179         -
                let formatted_17 = ::aws_smithy_http::header::quote_header_value(inner_16.as_str());
         188  +
        for inner_16 in inner_15 {
         189  +
            let formatted_17 = ::aws_smithy_http::header::quote_header_value(inner_16.as_str());
         190  +
            if !formatted_17.is_empty() {
  180    191   
                let header_value = formatted_17;
  181    192   
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  182    193   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
  183    194   
                        "object_attributes",
  184    195   
                        format!("`{}` cannot be used as a header value: {}", &header_value, err),
  185    196   
                    )
  186    197   
                })?;
  187    198   
                builder = builder.header("x-amz-object-attributes", header_value);
  188    199   
            }
  189    200   
        }

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

@@ -17,17 +68,72 @@
   37     37   
        output.build()
   38     38   
    })
   39     39   
}
   40     40   
   41     41   
pub fn ser_get_object_legal_hold_headers(
   42     42   
    input: &crate::operation::get_object_legal_hold::GetObjectLegalHoldInput,
   43     43   
    mut builder: ::http::request::Builder,
   44     44   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   45     45   
    if let ::std::option::Option::Some(inner_1) = &input.request_payer {
   46     46   
        let formatted_2 = inner_1.as_str();
   47         -
        let header_value = formatted_2;
   48         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   49         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   50         -
                "request_payer",
   51         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   52         -
            )
   53         -
        })?;
   54         -
        builder = builder.header("x-amz-request-payer", header_value);
          47  +
        if !formatted_2.is_empty() {
          48  +
            let header_value = formatted_2;
          49  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          50  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          51  +
                    "request_payer",
          52  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          53  +
                )
          54  +
            })?;
          55  +
            builder = builder.header("x-amz-request-payer", header_value);
          56  +
        }
   55     57   
    }
   56     58   
    if let ::std::option::Option::Some(inner_3) = &input.expected_bucket_owner {
   57     59   
        let formatted_4 = inner_3.as_str();
   58         -
        let header_value = formatted_4;
   59         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   60         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   61         -
                "expected_bucket_owner",
   62         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   63         -
            )
   64         -
        })?;
   65         -
        builder = builder.header("x-amz-expected-bucket-owner", header_value);
          60  +
        if !formatted_4.is_empty() {
          61  +
            let header_value = formatted_4;
          62  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          63  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          64  +
                    "expected_bucket_owner",
          65  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          66  +
                )
          67  +
            })?;
          68  +
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
          69  +
        }
   66     70   
    }
   67     71   
    Ok(builder)
   68     72   
}

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

@@ -19,19 +59,61 @@
   39     39   
        output.build()
   40     40   
    })
   41     41   
}
   42     42   
   43     43   
pub fn ser_get_object_lock_configuration_headers(
   44     44   
    input: &crate::operation::get_object_lock_configuration::GetObjectLockConfigurationInput,
   45     45   
    mut builder: ::http::request::Builder,
   46     46   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   47     47   
    if let ::std::option::Option::Some(inner_1) = &input.expected_bucket_owner {
   48     48   
        let formatted_2 = inner_1.as_str();
   49         -
        let header_value = formatted_2;
   50         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   51         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   52         -
                "expected_bucket_owner",
   53         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   54         -
            )
   55         -
        })?;
   56         -
        builder = builder.header("x-amz-expected-bucket-owner", header_value);
          49  +
        if !formatted_2.is_empty() {
          50  +
            let header_value = formatted_2;
          51  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          52  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          53  +
                    "expected_bucket_owner",
          54  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          55  +
                )
          56  +
            })?;
          57  +
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
          58  +
        }
   57     59   
    }
   58     60   
    Ok(builder)
   59     61   
}

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

@@ -17,17 +68,72 @@
   37     37   
        output.build()
   38     38   
    })
   39     39   
}
   40     40   
   41     41   
pub fn ser_get_object_retention_headers(
   42     42   
    input: &crate::operation::get_object_retention::GetObjectRetentionInput,
   43     43   
    mut builder: ::http::request::Builder,
   44     44   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   45     45   
    if let ::std::option::Option::Some(inner_1) = &input.request_payer {
   46     46   
        let formatted_2 = inner_1.as_str();
   47         -
        let header_value = formatted_2;
   48         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   49         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   50         -
                "request_payer",
   51         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   52         -
            )
   53         -
        })?;
   54         -
        builder = builder.header("x-amz-request-payer", header_value);
          47  +
        if !formatted_2.is_empty() {
          48  +
            let header_value = formatted_2;
          49  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          50  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          51  +
                    "request_payer",
          52  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          53  +
                )
          54  +
            })?;
          55  +
            builder = builder.header("x-amz-request-payer", header_value);
          56  +
        }
   55     57   
    }
   56     58   
    if let ::std::option::Option::Some(inner_3) = &input.expected_bucket_owner {
   57     59   
        let formatted_4 = inner_3.as_str();
   58         -
        let header_value = formatted_4;
   59         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   60         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   61         -
                "expected_bucket_owner",
   62         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   63         -
            )
   64         -
        })?;
   65         -
        builder = builder.header("x-amz-expected-bucket-owner", header_value);
          60  +
        if !formatted_4.is_empty() {
          61  +
            let header_value = formatted_4;
          62  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          63  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          64  +
                    "expected_bucket_owner",
          65  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          66  +
                )
          67  +
            })?;
          68  +
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
          69  +
        }
   66     70   
    }
   67     71   
    Ok(builder)
   68     72   
}

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

@@ -17,17 +95,99 @@
   37     37   
            .map_err(crate::operation::get_object_tagging::GetObjectTaggingError::unhandled)?
   38     38   
    })
   39     39   
}
   40     40   
   41     41   
pub fn ser_get_object_tagging_headers(
   42     42   
    input: &crate::operation::get_object_tagging::GetObjectTaggingInput,
   43     43   
    mut builder: ::http::request::Builder,
   44     44   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   45     45   
    if let ::std::option::Option::Some(inner_1) = &input.expected_bucket_owner {
   46     46   
        let formatted_2 = inner_1.as_str();
   47         -
        let header_value = formatted_2;
   48         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   49         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   50         -
                "expected_bucket_owner",
   51         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   52         -
            )
   53         -
        })?;
   54         -
        builder = builder.header("x-amz-expected-bucket-owner", header_value);
          47  +
        if !formatted_2.is_empty() {
          48  +
            let header_value = formatted_2;
          49  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          50  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          51  +
                    "expected_bucket_owner",
          52  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          53  +
                )
          54  +
            })?;
          55  +
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
          56  +
        }
   55     57   
    }
   56     58   
    if let ::std::option::Option::Some(inner_3) = &input.request_payer {
   57     59   
        let formatted_4 = inner_3.as_str();
   58         -
        let header_value = formatted_4;
   59         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   60         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   61         -
                "request_payer",
   62         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   63         -
            )
   64         -
        })?;
   65         -
        builder = builder.header("x-amz-request-payer", header_value);
          60  +
        if !formatted_4.is_empty() {
          61  +
            let header_value = formatted_4;
          62  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          63  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          64  +
                    "request_payer",
          65  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          66  +
                )
          67  +
            })?;
          68  +
            builder = builder.header("x-amz-request-payer", header_value);
          69  +
        }
   66     70   
    }
   67     71   
    Ok(builder)
   68     72   
}
   69     73   
   70     74   
#[allow(unused_mut)]
   71     75   
pub fn de_get_object_tagging(
   72     76   
    inp: &[u8],
   73     77   
    mut builder: crate::operation::get_object_tagging::builders::GetObjectTaggingOutputBuilder,
   74     78   
) -> Result<crate::operation::get_object_tagging::builders::GetObjectTaggingOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
   75     79   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;

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

@@ -22,22 +73,77 @@
   42     42   
    let generic = generic_builder.build();
   43     43   
    Err(crate::operation::get_object_torrent::GetObjectTorrentError::generic(generic))
   44     44   
}
   45     45   
   46     46   
pub fn ser_get_object_torrent_headers(
   47     47   
    input: &crate::operation::get_object_torrent::GetObjectTorrentInput,
   48     48   
    mut builder: ::http::request::Builder,
   49     49   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   50     50   
    if let ::std::option::Option::Some(inner_1) = &input.request_payer {
   51     51   
        let formatted_2 = inner_1.as_str();
   52         -
        let header_value = formatted_2;
   53         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   54         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   55         -
                "request_payer",
   56         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   57         -
            )
   58         -
        })?;
   59         -
        builder = builder.header("x-amz-request-payer", header_value);
          52  +
        if !formatted_2.is_empty() {
          53  +
            let header_value = formatted_2;
          54  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          55  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          56  +
                    "request_payer",
          57  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          58  +
                )
          59  +
            })?;
          60  +
            builder = builder.header("x-amz-request-payer", header_value);
          61  +
        }
   60     62   
    }
   61     63   
    if let ::std::option::Option::Some(inner_3) = &input.expected_bucket_owner {
   62     64   
        let formatted_4 = inner_3.as_str();
   63         -
        let header_value = formatted_4;
   64         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   65         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   66         -
                "expected_bucket_owner",
   67         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   68         -
            )
   69         -
        })?;
   70         -
        builder = builder.header("x-amz-expected-bucket-owner", header_value);
          65  +
        if !formatted_4.is_empty() {
          66  +
            let header_value = formatted_4;
          67  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          68  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          69  +
                    "expected_bucket_owner",
          70  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          71  +
                )
          72  +
            })?;
          73  +
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
          74  +
        }
   71     75   
    }
   72     76   
    Ok(builder)
   73     77   
}

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

@@ -17,17 +57,59 @@
   37     37   
        output.build()
   38     38   
    })
   39     39   
}
   40     40   
   41     41   
pub fn ser_get_public_access_block_headers(
   42     42   
    input: &crate::operation::get_public_access_block::GetPublicAccessBlockInput,
   43     43   
    mut builder: ::http::request::Builder,
   44     44   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   45     45   
    if let ::std::option::Option::Some(inner_1) = &input.expected_bucket_owner {
   46     46   
        let formatted_2 = inner_1.as_str();
   47         -
        let header_value = formatted_2;
   48         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   49         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   50         -
                "expected_bucket_owner",
   51         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   52         -
            )
   53         -
        })?;
   54         -
        builder = builder.header("x-amz-expected-bucket-owner", header_value);
          47  +
        if !formatted_2.is_empty() {
          48  +
            let header_value = formatted_2;
          49  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          50  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          51  +
                    "expected_bucket_owner",
          52  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          53  +
                )
          54  +
            })?;
          55  +
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
          56  +
        }
   55     57   
    }
   56     58   
    Ok(builder)
   57     59   
}

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

@@ -55,55 +95,97 @@
   75     75   
        output.build()
   76     76   
    })
   77     77   
}
   78     78   
   79     79   
pub fn ser_head_bucket_headers(
   80     80   
    input: &crate::operation::head_bucket::HeadBucketInput,
   81     81   
    mut builder: ::http::request::Builder,
   82     82   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   83     83   
    if let ::std::option::Option::Some(inner_1) = &input.expected_bucket_owner {
   84     84   
        let formatted_2 = inner_1.as_str();
   85         -
        let header_value = formatted_2;
   86         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   87         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   88         -
                "expected_bucket_owner",
   89         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   90         -
            )
   91         -
        })?;
   92         -
        builder = builder.header("x-amz-expected-bucket-owner", header_value);
          85  +
        if !formatted_2.is_empty() {
          86  +
            let header_value = formatted_2;
          87  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          88  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          89  +
                    "expected_bucket_owner",
          90  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          91  +
                )
          92  +
            })?;
          93  +
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
          94  +
        }
   93     95   
    }
   94     96   
    Ok(builder)
   95     97   
}