AWS SDK

AWS SDK

rev. a7fb2e3446d314cfbe48069306e4e0a389b39aeb (ignoring whitespace)

Files changed:

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

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

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

@@ -16,16 +67,71 @@
   36     36   
        output.build()
   37     37   
    })
   38     38   
}
   39     39   
   40     40   
pub fn ser_put_bucket_ownership_controls_headers(
   41     41   
    input: &crate::operation::put_bucket_ownership_controls::PutBucketOwnershipControlsInput,
   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.content_md5 {
   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   
                    "content_md5",
   50     51   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   51     52   
                )
   52     53   
            })?;
   53     54   
            builder = builder.header("Content-MD5", header_value);
   54     55   
        }
          56  +
    }
   55     57   
    if let ::std::option::Option::Some(inner_3) = &input.expected_bucket_owner {
   56     58   
        let formatted_4 = inner_3.as_str();
          59  +
        if !formatted_4.is_empty() {
   57     60   
            let header_value = formatted_4;
   58     61   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   59     62   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   60     63   
                    "expected_bucket_owner",
   61     64   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   62     65   
                )
   63     66   
            })?;
   64     67   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   65     68   
        }
          69  +
    }
   66     70   
    Ok(builder)
   67     71   
}

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

@@ -8,8 +82,90 @@
   28     28   
        output.build()
   29     29   
    })
   30     30   
}
   31     31   
   32     32   
pub fn ser_put_bucket_policy_headers(
   33     33   
    input: &crate::operation::put_bucket_policy::PutBucketPolicyInput,
   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.content_md5 {
   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   
                    "content_md5",
   42     43   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   43     44   
                )
   44     45   
            })?;
   45     46   
            builder = builder.header("Content-MD5", header_value);
   46     47   
        }
          48  +
    }
   47     49   
    if let ::std::option::Option::Some(inner_3) = &input.checksum_algorithm {
   48     50   
        let formatted_4 = inner_3.as_str();
          51  +
        if !formatted_4.is_empty() {
   49     52   
            let header_value = formatted_4;
   50     53   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   51     54   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   52     55   
                    "checksum_algorithm",
   53     56   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   54     57   
                )
   55     58   
            })?;
   56     59   
            builder = builder.header("x-amz-sdk-checksum-algorithm", header_value);
   57     60   
        }
          61  +
    }
   58     62   
    if let ::std::option::Option::Some(inner_5) = &input.confirm_remove_self_bucket_access {
   59     63   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_5);
   60     64   
        let formatted_6 = encoder.encode();
          65  +
        if !formatted_6.is_empty() {
   61     66   
            let header_value = formatted_6;
   62     67   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   63     68   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   64     69   
                    "confirm_remove_self_bucket_access",
   65     70   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   66     71   
                )
   67     72   
            })?;
   68     73   
            builder = builder.header("x-amz-confirm-remove-self-bucket-access", header_value);
   69     74   
        }
          75  +
    }
   70     76   
    if let ::std::option::Option::Some(inner_7) = &input.expected_bucket_owner {
   71     77   
        let formatted_8 = inner_7.as_str();
          78  +
        if !formatted_8.is_empty() {
   72     79   
            let header_value = formatted_8;
   73     80   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   74     81   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   75     82   
                    "expected_bucket_owner",
   76     83   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   77     84   
                )
   78     85   
            })?;
   79     86   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   80     87   
        }
          88  +
    }
   81     89   
    Ok(builder)
   82     90   
}

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

@@ -14,14 +87,95 @@
   34     34   
        output.build()
   35     35   
    })
   36     36   
}
   37     37   
   38     38   
pub fn ser_put_bucket_replication_headers(
   39     39   
    input: &crate::operation::put_bucket_replication::PutBucketReplicationInput,
   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.content_md5 {
   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   
                    "content_md5",
   48     49   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   49     50   
                )
   50     51   
            })?;
   51     52   
            builder = builder.header("Content-MD5", header_value);
   52     53   
        }
          54  +
    }
   53     55   
    if let ::std::option::Option::Some(inner_3) = &input.checksum_algorithm {
   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   
                    "checksum_algorithm",
   59     62   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   60     63   
                )
   61     64   
            })?;
   62     65   
            builder = builder.header("x-amz-sdk-checksum-algorithm", header_value);
   63     66   
        }
          67  +
    }
   64     68   
    if let ::std::option::Option::Some(inner_5) = &input.token {
   65     69   
        let formatted_6 = inner_5.as_str();
          70  +
        if !formatted_6.is_empty() {
   66     71   
            let header_value = formatted_6;
   67     72   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   68     73   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   69     74   
                    "token",
   70     75   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   71     76   
                )
   72     77   
            })?;
   73     78   
            builder = builder.header("x-amz-bucket-object-lock-token", header_value);
   74     79   
        }
          80  +
    }
   75     81   
    if let ::std::option::Option::Some(inner_7) = &input.expected_bucket_owner {
   76     82   
        let formatted_8 = inner_7.as_str();
          83  +
        if !formatted_8.is_empty() {
   77     84   
            let header_value = formatted_8;
   78     85   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   79     86   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   80     87   
                    "expected_bucket_owner",
   81     88   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   82     89   
                )
   83     90   
            })?;
   84     91   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   85     92   
        }
          93  +
    }
   86     94   
    Ok(builder)
   87     95   
}

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

@@ -16,16 +78,84 @@
   36     36   
        output.build()
   37     37   
    })
   38     38   
}
   39     39   
   40     40   
pub fn ser_put_bucket_request_payment_headers(
   41     41   
    input: &crate::operation::put_bucket_request_payment::PutBucketRequestPaymentInput,
   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.content_md5 {
   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   
                    "content_md5",
   50     51   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   51     52   
                )
   52     53   
            })?;
   53     54   
            builder = builder.header("Content-MD5", header_value);
   54     55   
        }
          56  +
    }
   55     57   
    if let ::std::option::Option::Some(inner_3) = &input.checksum_algorithm {
   56     58   
        let formatted_4 = inner_3.as_str();
          59  +
        if !formatted_4.is_empty() {
   57     60   
            let header_value = formatted_4;
   58     61   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   59     62   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   60     63   
                    "checksum_algorithm",
   61     64   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   62     65   
                )
   63     66   
            })?;
   64     67   
            builder = builder.header("x-amz-sdk-checksum-algorithm", header_value);
   65     68   
        }
          69  +
    }
   66     70   
    if let ::std::option::Option::Some(inner_5) = &input.expected_bucket_owner {
   67     71   
        let formatted_6 = inner_5.as_str();
          72  +
        if !formatted_6.is_empty() {
   68     73   
            let header_value = formatted_6;
   69     74   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   70     75   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   71     76   
                    "expected_bucket_owner",
   72     77   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   73     78   
                )
   74     79   
            })?;
   75     80   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   76     81   
        }
          82  +
    }
   77     83   
    Ok(builder)
   78     84   
}

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

@@ -8,8 +70,76 @@
   28     28   
        output.build()
   29     29   
    })
   30     30   
}
   31     31   
   32     32   
pub fn ser_put_bucket_tagging_headers(
   33     33   
    input: &crate::operation::put_bucket_tagging::PutBucketTaggingInput,
   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.content_md5 {
   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   
                    "content_md5",
   42     43   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   43     44   
                )
   44     45   
            })?;
   45     46   
            builder = builder.header("Content-MD5", header_value);
   46     47   
        }
          48  +
    }
   47     49   
    if let ::std::option::Option::Some(inner_3) = &input.checksum_algorithm {
   48     50   
        let formatted_4 = inner_3.as_str();
          51  +
        if !formatted_4.is_empty() {
   49     52   
            let header_value = formatted_4;
   50     53   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   51     54   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   52     55   
                    "checksum_algorithm",
   53     56   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   54     57   
                )
   55     58   
            })?;
   56     59   
            builder = builder.header("x-amz-sdk-checksum-algorithm", header_value);
   57     60   
        }
          61  +
    }
   58     62   
    if let ::std::option::Option::Some(inner_5) = &input.expected_bucket_owner {
   59     63   
        let formatted_6 = inner_5.as_str();
          64  +
        if !formatted_6.is_empty() {
   60     65   
            let header_value = formatted_6;
   61     66   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   62     67   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   63     68   
                    "expected_bucket_owner",
   64     69   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   65     70   
                )
   66     71   
            })?;
   67     72   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   68     73   
        }
          74  +
    }
   69     75   
    Ok(builder)
   70     76   
}

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

@@ -14,14 +87,95 @@
   34     34   
        output.build()
   35     35   
    })
   36     36   
}
   37     37   
   38     38   
pub fn ser_put_bucket_versioning_headers(
   39     39   
    input: &crate::operation::put_bucket_versioning::PutBucketVersioningInput,
   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.content_md5 {
   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   
                    "content_md5",
   48     49   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   49     50   
                )
   50     51   
            })?;
   51     52   
            builder = builder.header("Content-MD5", header_value);
   52     53   
        }
          54  +
    }
   53     55   
    if let ::std::option::Option::Some(inner_3) = &input.checksum_algorithm {
   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   
                    "checksum_algorithm",
   59     62   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   60     63   
                )
   61     64   
            })?;
   62     65   
            builder = builder.header("x-amz-sdk-checksum-algorithm", header_value);
   63     66   
        }
          67  +
    }
   64     68   
    if let ::std::option::Option::Some(inner_5) = &input.mfa {
   65     69   
        let formatted_6 = inner_5.as_str();
          70  +
        if !formatted_6.is_empty() {
   66     71   
            let header_value = formatted_6;
   67     72   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   68     73   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   69     74   
                    "mfa",
   70     75   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   71     76   
                )
   72     77   
            })?;
   73     78   
            builder = builder.header("x-amz-mfa", header_value);
   74     79   
        }
          80  +
    }
   75     81   
    if let ::std::option::Option::Some(inner_7) = &input.expected_bucket_owner {
   76     82   
        let formatted_8 = inner_7.as_str();
          83  +
        if !formatted_8.is_empty() {
   77     84   
            let header_value = formatted_8;
   78     85   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   79     86   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   80     87   
                    "expected_bucket_owner",
   81     88   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   82     89   
                )
   83     90   
            })?;
   84     91   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   85     92   
        }
          93  +
    }
   86     94   
    Ok(builder)
   87     95   
}

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

@@ -8,8 +70,76 @@
   28     28   
        output.build()
   29     29   
    })
   30     30   
}
   31     31   
   32     32   
pub fn ser_put_bucket_website_headers(
   33     33   
    input: &crate::operation::put_bucket_website::PutBucketWebsiteInput,
   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.content_md5 {
   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   
                    "content_md5",
   42     43   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   43     44   
                )
   44     45   
            })?;
   45     46   
            builder = builder.header("Content-MD5", header_value);
   46     47   
        }
          48  +
    }
   47     49   
    if let ::std::option::Option::Some(inner_3) = &input.checksum_algorithm {
   48     50   
        let formatted_4 = inner_3.as_str();
          51  +
        if !formatted_4.is_empty() {
   49     52   
            let header_value = formatted_4;
   50     53   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   51     54   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   52     55   
                    "checksum_algorithm",
   53     56   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   54     57   
                )
   55     58   
            })?;
   56     59   
            builder = builder.header("x-amz-sdk-checksum-algorithm", header_value);
   57     60   
        }
          61  +
    }
   58     62   
    if let ::std::option::Option::Some(inner_5) = &input.expected_bucket_owner {
   59     63   
        let formatted_6 = inner_5.as_str();
          64  +
        if !formatted_6.is_empty() {
   60     65   
            let header_value = formatted_6;
   61     66   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   62     67   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   63     68   
                    "expected_bucket_owner",
   64     69   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   65     70   
                )
   66     71   
            })?;
   67     72   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   68     73   
        }
          74  +
    }
   69     75   
    Ok(builder)
   70     76   
}

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

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

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

@@ -36,36 +175,195 @@
   56     56   
        output.build()
   57     57   
    })
   58     58   
}
   59     59   
   60     60   
pub fn ser_put_object_acl_headers(
   61     61   
    input: &crate::operation::put_object_acl::PutObjectAclInput,
   62     62   
    mut builder: ::http::request::Builder,
   63     63   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   64     64   
    if let ::std::option::Option::Some(inner_1) = &input.acl {
   65     65   
        let formatted_2 = inner_1.as_str();
          66  +
        if !formatted_2.is_empty() {
   66     67   
            let header_value = formatted_2;
   67     68   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   68     69   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   69     70   
                    "acl",
   70     71   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   71     72   
                )
   72     73   
            })?;
   73     74   
            builder = builder.header("x-amz-acl", header_value);
   74     75   
        }
          76  +
    }
   75     77   
    if let ::std::option::Option::Some(inner_3) = &input.content_md5 {
   76     78   
        let formatted_4 = inner_3.as_str();
          79  +
        if !formatted_4.is_empty() {
   77     80   
            let header_value = formatted_4;
   78     81   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   79     82   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   80     83   
                    "content_md5",
   81     84   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   82     85   
                )
   83     86   
            })?;
   84     87   
            builder = builder.header("Content-MD5", header_value);
   85     88   
        }
          89  +
    }
   86     90   
    if let ::std::option::Option::Some(inner_5) = &input.checksum_algorithm {
   87     91   
        let formatted_6 = inner_5.as_str();
          92  +
        if !formatted_6.is_empty() {
   88     93   
            let header_value = formatted_6;
   89     94   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   90     95   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   91     96   
                    "checksum_algorithm",
   92     97   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   93     98   
                )
   94     99   
            })?;
   95    100   
            builder = builder.header("x-amz-sdk-checksum-algorithm", header_value);
   96    101   
        }
         102  +
    }
   97    103   
    if let ::std::option::Option::Some(inner_7) = &input.grant_full_control {
   98    104   
        let formatted_8 = inner_7.as_str();
         105  +
        if !formatted_8.is_empty() {
   99    106   
            let header_value = formatted_8;
  100    107   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  101    108   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  102    109   
                    "grant_full_control",
  103    110   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  104    111   
                )
  105    112   
            })?;
  106    113   
            builder = builder.header("x-amz-grant-full-control", header_value);
  107    114   
        }
         115  +
    }
  108    116   
    if let ::std::option::Option::Some(inner_9) = &input.grant_read {
  109    117   
        let formatted_10 = inner_9.as_str();
         118  +
        if !formatted_10.is_empty() {
  110    119   
            let header_value = formatted_10;
  111    120   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  112    121   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  113    122   
                    "grant_read",
  114    123   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  115    124   
                )
  116    125   
            })?;
  117    126   
            builder = builder.header("x-amz-grant-read", header_value);
  118    127   
        }
         128  +
    }
  119    129   
    if let ::std::option::Option::Some(inner_11) = &input.grant_read_acp {
  120    130   
        let formatted_12 = inner_11.as_str();
         131  +
        if !formatted_12.is_empty() {
  121    132   
            let header_value = formatted_12;
  122    133   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  123    134   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  124    135   
                    "grant_read_acp",
  125    136   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  126    137   
                )
  127    138   
            })?;
  128    139   
            builder = builder.header("x-amz-grant-read-acp", header_value);
  129    140   
        }
         141  +
    }
  130    142   
    if let ::std::option::Option::Some(inner_13) = &input.grant_write {
  131    143   
        let formatted_14 = inner_13.as_str();
         144  +
        if !formatted_14.is_empty() {
  132    145   
            let header_value = formatted_14;
  133    146   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  134    147   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  135    148   
                    "grant_write",
  136    149   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  137    150   
                )
  138    151   
            })?;
  139    152   
            builder = builder.header("x-amz-grant-write", header_value);
  140    153   
        }
         154  +
    }
  141    155   
    if let ::std::option::Option::Some(inner_15) = &input.grant_write_acp {
  142    156   
        let formatted_16 = inner_15.as_str();
         157  +
        if !formatted_16.is_empty() {
  143    158   
            let header_value = formatted_16;
  144    159   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  145    160   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  146    161   
                    "grant_write_acp",
  147    162   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  148    163   
                )
  149    164   
            })?;
  150    165   
            builder = builder.header("x-amz-grant-write-acp", header_value);
  151    166   
        }
         167  +
    }
  152    168   
    if let ::std::option::Option::Some(inner_17) = &input.request_payer {
  153    169   
        let formatted_18 = inner_17.as_str();
         170  +
        if !formatted_18.is_empty() {
  154    171   
            let header_value = formatted_18;
  155    172   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  156    173   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  157    174   
                    "request_payer",
  158    175   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  159    176   
                )
  160    177   
            })?;
  161    178   
            builder = builder.header("x-amz-request-payer", header_value);
  162    179   
        }
         180  +
    }
  163    181   
    if let ::std::option::Option::Some(inner_19) = &input.expected_bucket_owner {
  164    182   
        let formatted_20 = inner_19.as_str();
         183  +
        if !formatted_20.is_empty() {
  165    184   
            let header_value = formatted_20;
  166    185   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  167    186   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  168    187   
                    "expected_bucket_owner",
  169    188   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  170    189   
                )
  171    190   
            })?;
  172    191   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
  173    192   
        }
         193  +
    }
  174    194   
    Ok(builder)
  175    195   
}

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

@@ -21,21 +94,102 @@
   41     41   
        output.build()
   42     42   
    })
   43     43   
}
   44     44   
   45     45   
pub fn ser_put_object_legal_hold_headers(
   46     46   
    input: &crate::operation::put_object_legal_hold::PutObjectLegalHoldInput,
   47     47   
    mut builder: ::http::request::Builder,
   48     48   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   49     49   
    if let ::std::option::Option::Some(inner_1) = &input.request_payer {
   50     50   
        let formatted_2 = inner_1.as_str();
          51  +
        if !formatted_2.is_empty() {
   51     52   
            let header_value = formatted_2;
   52     53   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   53     54   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   54     55   
                    "request_payer",
   55     56   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   56     57   
                )
   57     58   
            })?;
   58     59   
            builder = builder.header("x-amz-request-payer", header_value);
   59     60   
        }
          61  +
    }
   60     62   
    if let ::std::option::Option::Some(inner_3) = &input.content_md5 {
   61     63   
        let formatted_4 = inner_3.as_str();
          64  +
        if !formatted_4.is_empty() {
   62     65   
            let header_value = formatted_4;
   63     66   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   64     67   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   65     68   
                    "content_md5",
   66     69   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   67     70   
                )
   68     71   
            })?;
   69     72   
            builder = builder.header("Content-MD5", header_value);
   70     73   
        }
          74  +
    }
   71     75   
    if let ::std::option::Option::Some(inner_5) = &input.checksum_algorithm {
   72     76   
        let formatted_6 = inner_5.as_str();
          77  +
        if !formatted_6.is_empty() {
   73     78   
            let header_value = formatted_6;
   74     79   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   75     80   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   76     81   
                    "checksum_algorithm",
   77     82   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   78     83   
                )
   79     84   
            })?;
   80     85   
            builder = builder.header("x-amz-sdk-checksum-algorithm", header_value);
   81     86   
        }
          87  +
    }
   82     88   
    if let ::std::option::Option::Some(inner_7) = &input.expected_bucket_owner {
   83     89   
        let formatted_8 = inner_7.as_str();
          90  +
        if !formatted_8.is_empty() {
   84     91   
            let header_value = formatted_8;
   85     92   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   86     93   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   87     94   
                    "expected_bucket_owner",
   88     95   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   89     96   
                )
   90     97   
            })?;
   91     98   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   92     99   
        }
         100  +
    }
   93    101   
    Ok(builder)
   94    102   
}

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

@@ -23,23 +107,117 @@
   43     43   
        output.build()
   44     44   
    })
   45     45   
}
   46     46   
   47     47   
pub fn ser_put_object_lock_configuration_headers(
   48     48   
    input: &crate::operation::put_object_lock_configuration::PutObjectLockConfigurationInput,
   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.request_payer {
   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   
                    "request_payer",
   57     58   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   58     59   
                )
   59     60   
            })?;
   60     61   
            builder = builder.header("x-amz-request-payer", header_value);
   61     62   
        }
          63  +
    }
   62     64   
    if let ::std::option::Option::Some(inner_3) = &input.token {
   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   
                    "token",
   68     71   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   69     72   
                )
   70     73   
            })?;
   71     74   
            builder = builder.header("x-amz-bucket-object-lock-token", header_value);
   72     75   
        }
          76  +
    }
   73     77   
    if let ::std::option::Option::Some(inner_5) = &input.content_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   
                    "content_md5",
   79     84   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   80     85   
                )
   81     86   
            })?;
   82     87   
            builder = builder.header("Content-MD5", header_value);
   83     88   
        }
          89  +
    }
   84     90   
    if let ::std::option::Option::Some(inner_7) = &input.checksum_algorithm {
   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   
                    "checksum_algorithm",
   90     97   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   91     98   
                )
   92     99   
            })?;
   93    100   
            builder = builder.header("x-amz-sdk-checksum-algorithm", header_value);
   94    101   
        }
         102  +
    }
   95    103   
    if let ::std::option::Option::Some(inner_9) = &input.expected_bucket_owner {
   96    104   
        let formatted_10 = inner_9.as_str();
         105  +
        if !formatted_10.is_empty() {
   97    106   
            let header_value = formatted_10;
   98    107   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   99    108   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  100    109   
                    "expected_bucket_owner",
  101    110   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  102    111   
                )
  103    112   
            })?;
  104    113   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
  105    114   
        }
         115  +
    }
  106    116   
    Ok(builder)
  107    117   
}

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

@@ -21,21 +106,116 @@
   41     41   
        output.build()
   42     42   
    })
   43     43   
}
   44     44   
   45     45   
pub fn ser_put_object_retention_headers(
   46     46   
    input: &crate::operation::put_object_retention::PutObjectRetentionInput,
   47     47   
    mut builder: ::http::request::Builder,
   48     48   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   49     49   
    if let ::std::option::Option::Some(inner_1) = &input.request_payer {
   50     50   
        let formatted_2 = inner_1.as_str();
          51  +
        if !formatted_2.is_empty() {
   51     52   
            let header_value = formatted_2;
   52     53   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   53     54   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   54     55   
                    "request_payer",
   55     56   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   56     57   
                )
   57     58   
            })?;
   58     59   
            builder = builder.header("x-amz-request-payer", header_value);
   59     60   
        }
          61  +
    }
   60     62   
    if let ::std::option::Option::Some(inner_3) = &input.bypass_governance_retention {
   61     63   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_3);
   62     64   
        let formatted_4 = encoder.encode();
          65  +
        if !formatted_4.is_empty() {
   63     66   
            let header_value = formatted_4;
   64     67   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   65     68   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   66     69   
                    "bypass_governance_retention",
   67     70   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   68     71   
                )
   69     72   
            })?;
   70     73   
            builder = builder.header("x-amz-bypass-governance-retention", header_value);
   71     74   
        }
          75  +
    }
   72     76   
    if let ::std::option::Option::Some(inner_5) = &input.content_md5 {
   73     77   
        let formatted_6 = inner_5.as_str();
          78  +
        if !formatted_6.is_empty() {
   74     79   
            let header_value = formatted_6;
   75     80   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   76     81   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   77     82   
                    "content_md5",
   78     83   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   79     84   
                )
   80     85   
            })?;
   81     86   
            builder = builder.header("Content-MD5", header_value);
   82     87   
        }
          88  +
    }
   83     89   
    if let ::std::option::Option::Some(inner_7) = &input.checksum_algorithm {
   84     90   
        let formatted_8 = inner_7.as_str();
          91  +
        if !formatted_8.is_empty() {
   85     92   
            let header_value = formatted_8;
   86     93   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   87     94   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   88     95   
                    "checksum_algorithm",
   89     96   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   90     97   
                )
   91     98   
            })?;
   92     99   
            builder = builder.header("x-amz-sdk-checksum-algorithm", header_value);
   93    100   
        }
         101  +
    }
   94    102   
    if let ::std::option::Option::Some(inner_9) = &input.expected_bucket_owner {
   95    103   
        let formatted_10 = inner_9.as_str();
         104  +
        if !formatted_10.is_empty() {
   96    105   
            let header_value = formatted_10;
   97    106   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   98    107   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   99    108   
                    "expected_bucket_owner",
  100    109   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  101    110   
                )
  102    111   
            })?;
  103    112   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
  104    113   
        }
         114  +
    }
  105    115   
    Ok(builder)
  106    116   
}

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

@@ -13,13 +86,94 @@
   33     33   
        output.build()
   34     34   
    })
   35     35   
}
   36     36   
   37     37   
pub fn ser_put_object_tagging_headers(
   38     38   
    input: &crate::operation::put_object_tagging::PutObjectTaggingInput,
   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.content_md5 {
   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   
                    "content_md5",
   47     48   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   48     49   
                )
   49     50   
            })?;
   50     51   
            builder = builder.header("Content-MD5", header_value);
   51     52   
        }
          53  +
    }
   52     54   
    if let ::std::option::Option::Some(inner_3) = &input.checksum_algorithm {
   53     55   
        let formatted_4 = inner_3.as_str();
          56  +
        if !formatted_4.is_empty() {
   54     57   
            let header_value = formatted_4;
   55     58   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   56     59   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   57     60   
                    "checksum_algorithm",
   58     61   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   59     62   
                )
   60     63   
            })?;
   61     64   
            builder = builder.header("x-amz-sdk-checksum-algorithm", header_value);
   62     65   
        }
          66  +
    }
   63     67   
    if let ::std::option::Option::Some(inner_5) = &input.expected_bucket_owner {
   64     68   
        let formatted_6 = inner_5.as_str();
          69  +
        if !formatted_6.is_empty() {
   65     70   
            let header_value = formatted_6;
   66     71   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   67     72   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   68     73   
                    "expected_bucket_owner",
   69     74   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   70     75   
                )
   71     76   
            })?;
   72     77   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   73     78   
        }
          79  +
    }
   74     80   
    if let ::std::option::Option::Some(inner_7) = &input.request_payer {
   75     81   
        let formatted_8 = inner_7.as_str();
          82  +
        if !formatted_8.is_empty() {
   76     83   
            let header_value = formatted_8;
   77     84   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   78     85   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   79     86   
                    "request_payer",
   80     87   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   81     88   
                )
   82     89   
            })?;
   83     90   
            builder = builder.header("x-amz-request-payer", header_value);
   84     91   
        }
          92  +
    }
   85     93   
    Ok(builder)
   86     94   
}

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

@@ -14,14 +76,82 @@
   34     34   
        output.build()
   35     35   
    })
   36     36   
}
   37     37   
   38     38   
pub fn ser_put_public_access_block_headers(
   39     39   
    input: &crate::operation::put_public_access_block::PutPublicAccessBlockInput,
   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.content_md5 {
   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   
                    "content_md5",
   48     49   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   49     50   
                )
   50     51   
            })?;
   51     52   
            builder = builder.header("Content-MD5", header_value);
   52     53   
        }
          54  +
    }
   53     55   
    if let ::std::option::Option::Some(inner_3) = &input.checksum_algorithm {
   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   
                    "checksum_algorithm",
   59     62   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   60     63   
                )
   61     64   
            })?;
   62     65   
            builder = builder.header("x-amz-sdk-checksum-algorithm", header_value);
   63     66   
        }
          67  +
    }
   64     68   
    if let ::std::option::Option::Some(inner_5) = &input.expected_bucket_owner {
   65     69   
        let formatted_6 = inner_5.as_str();
          70  +
        if !formatted_6.is_empty() {
   66     71   
            let header_value = formatted_6;
   67     72   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   68     73   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   69     74   
                    "expected_bucket_owner",
   70     75   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   71     76   
                )
   72     77   
            })?;
   73     78   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   74     79   
        }
          80  +
    }
   75     81   
    Ok(builder)
   76     82   
}

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

@@ -46,46 +108,114 @@
   66     66   
        output.build()
   67     67   
    })
   68     68   
}
   69     69   
   70     70   
pub fn ser_restore_object_headers(
   71     71   
    input: &crate::operation::restore_object::RestoreObjectInput,
   72     72   
    mut builder: ::http::request::Builder,
   73     73   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   74     74   
    if let ::std::option::Option::Some(inner_1) = &input.request_payer {
   75     75   
        let formatted_2 = inner_1.as_str();
          76  +
        if !formatted_2.is_empty() {
   76     77   
            let header_value = formatted_2;
   77     78   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   78     79   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   79     80   
                    "request_payer",
   80     81   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   81     82   
                )
   82     83   
            })?;
   83     84   
            builder = builder.header("x-amz-request-payer", header_value);
   84     85   
        }
          86  +
    }
   85     87   
    if let ::std::option::Option::Some(inner_3) = &input.checksum_algorithm {
   86     88   
        let formatted_4 = inner_3.as_str();
          89  +
        if !formatted_4.is_empty() {
   87     90   
            let header_value = formatted_4;
   88     91   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   89     92   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   90     93   
                    "checksum_algorithm",
   91     94   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   92     95   
                )
   93     96   
            })?;
   94     97   
            builder = builder.header("x-amz-sdk-checksum-algorithm", header_value);
   95     98   
        }
          99  +
    }
   96    100   
    if let ::std::option::Option::Some(inner_5) = &input.expected_bucket_owner {
   97    101   
        let formatted_6 = inner_5.as_str();
         102  +
        if !formatted_6.is_empty() {
   98    103   
            let header_value = formatted_6;
   99    104   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  100    105   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  101    106   
                    "expected_bucket_owner",
  102    107   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  103    108   
                )
  104    109   
            })?;
  105    110   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
  106    111   
        }
         112  +
    }
  107    113   
    Ok(builder)
  108    114   
}