AWS SDK

AWS SDK

rev. a7fb2e3446d314cfbe48069306e4e0a389b39aeb (ignoring whitespace)

Files changed:

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

@@ -16,16 +84,86 @@
   36     36   
        output.build()
   37     37   
    })
   38     38   
}
   39     39   
   40     40   
pub fn ser_list_bucket_inventory_configurations_headers(
   41     41   
    input: &crate::operation::list_bucket_inventory_configurations::ListBucketInventoryConfigurationsInput,
   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  +
        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   
                    "expected_bucket_owner",
   50     51   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   51     52   
                )
   52     53   
            })?;
   53     54   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   54     55   
        }
          56  +
    }
   55     57   
    Ok(builder)
   56     58   
}
   57     59   
   58     60   
#[allow(unused_mut)]
   59     61   
pub fn de_list_bucket_inventory_configurations(
   60     62   
    inp: &[u8],
   61     63   
    mut builder: crate::operation::list_bucket_inventory_configurations::builders::ListBucketInventoryConfigurationsOutputBuilder,
   62     64   
) -> Result<
   63     65   
    crate::operation::list_bucket_inventory_configurations::builders::ListBucketInventoryConfigurationsOutputBuilder,
   64     66   
    ::aws_smithy_xml::decode::XmlDecodeError,

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

@@ -16,16 +84,86 @@
   36     36   
        output.build()
   37     37   
    })
   38     38   
}
   39     39   
   40     40   
pub fn ser_list_bucket_metrics_configurations_headers(
   41     41   
    input: &crate::operation::list_bucket_metrics_configurations::ListBucketMetricsConfigurationsInput,
   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  +
        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   
                    "expected_bucket_owner",
   50     51   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   51     52   
                )
   52     53   
            })?;
   53     54   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   54     55   
        }
          56  +
    }
   55     57   
    Ok(builder)
   56     58   
}
   57     59   
   58     60   
#[allow(unused_mut)]
   59     61   
pub fn de_list_bucket_metrics_configurations(
   60     62   
    inp: &[u8],
   61     63   
    mut builder: crate::operation::list_bucket_metrics_configurations::builders::ListBucketMetricsConfigurationsOutputBuilder,
   62     64   
) -> Result<
   63     65   
    crate::operation::list_bucket_metrics_configurations::builders::ListBucketMetricsConfigurationsOutputBuilder,
   64     66   
    ::aws_smithy_xml::decode::XmlDecodeError,

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

@@ -23,23 +102,106 @@
   43     43   
        output.build()
   44     44   
    })
   45     45   
}
   46     46   
   47     47   
pub fn ser_list_multipart_uploads_headers(
   48     48   
    input: &crate::operation::list_multipart_uploads::ListMultipartUploadsInput,
   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.expected_bucket_owner {
   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   
                    "expected_bucket_owner",
   57     58   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   58     59   
                )
   59     60   
            })?;
   60     61   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   61     62   
        }
          63  +
    }
   62     64   
    if let ::std::option::Option::Some(inner_3) = &input.request_payer {
   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   
                    "request_payer",
   68     71   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   69     72   
                )
   70     73   
            })?;
   71     74   
            builder = builder.header("x-amz-request-payer", header_value);
   72     75   
        }
          76  +
    }
   73     77   
    Ok(builder)
   74     78   
}
   75     79   
   76     80   
#[allow(unused_mut)]
   77     81   
pub fn de_list_multipart_uploads(
   78     82   
    inp: &[u8],
   79     83   
    mut builder: crate::operation::list_multipart_uploads::builders::ListMultipartUploadsOutputBuilder,
   80     84   
) -> Result<crate::operation::list_multipart_uploads::builders::ListMultipartUploadsOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
   81     85   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
   82     86   

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

@@ -23,23 +109,110 @@
   43     43   
        output.build()
   44     44   
    })
   45     45   
}
   46     46   
   47     47   
pub fn ser_list_object_versions_headers(
   48     48   
    input: &crate::operation::list_object_versions::ListObjectVersionsInput,
   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.expected_bucket_owner {
   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   
                    "expected_bucket_owner",
   57     58   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   58     59   
                )
   59     60   
            })?;
   60     61   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   61     62   
        }
          63  +
    }
   62     64   
    if let ::std::option::Option::Some(inner_3) = &input.request_payer {
   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   
                    "request_payer",
   68     71   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   69     72   
                )
   70     73   
            })?;
   71     74   
            builder = builder.header("x-amz-request-payer", header_value);
   72     75   
        }
          76  +
    }
   73     77   
    if let ::std::option::Option::Some(inner_5) = &input.optional_object_attributes {
   74         -
        // Empty vec in header is serialized as an empty string
   75         -
        if inner_5.is_empty() {
   76         -
            builder = builder.header("x-amz-optional-object-attributes", "");
   77         -
        } else {
   78     78   
        for inner_6 in inner_5 {
   79     79   
            let formatted_7 = ::aws_smithy_http::header::quote_header_value(inner_6.as_str());
          80  +
            if !formatted_7.is_empty() {
   80     81   
                let header_value = formatted_7;
   81     82   
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   82     83   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
   83     84   
                        "optional_object_attributes",
   84     85   
                        format!("`{}` cannot be used as a header value: {}", &header_value, err),
   85     86   
                    )
   86     87   
                })?;
   87     88   
                builder = builder.header("x-amz-optional-object-attributes", header_value);
   88     89   
            }
   89     90   
        }

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

@@ -38,38 +124,125 @@
   58     58   
        output.build()
   59     59   
    })
   60     60   
}
   61     61   
   62     62   
pub fn ser_list_objects_headers(
   63     63   
    input: &crate::operation::list_objects::ListObjectsInput,
   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  +
        if !formatted_2.is_empty() {
   68     69   
            let header_value = formatted_2;
   69     70   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   70     71   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   71     72   
                    "request_payer",
   72     73   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   73     74   
                )
   74     75   
            })?;
   75     76   
            builder = builder.header("x-amz-request-payer", header_value);
   76     77   
        }
          78  +
    }
   77     79   
    if let ::std::option::Option::Some(inner_3) = &input.expected_bucket_owner {
   78     80   
        let formatted_4 = inner_3.as_str();
          81  +
        if !formatted_4.is_empty() {
   79     82   
            let header_value = formatted_4;
   80     83   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   81     84   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   82     85   
                    "expected_bucket_owner",
   83     86   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   84     87   
                )
   85     88   
            })?;
   86     89   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   87     90   
        }
          91  +
    }
   88     92   
    if let ::std::option::Option::Some(inner_5) = &input.optional_object_attributes {
   89         -
        // Empty vec in header is serialized as an empty string
   90         -
        if inner_5.is_empty() {
   91         -
            builder = builder.header("x-amz-optional-object-attributes", "");
   92         -
        } else {
   93     93   
        for inner_6 in inner_5 {
   94     94   
            let formatted_7 = ::aws_smithy_http::header::quote_header_value(inner_6.as_str());
          95  +
            if !formatted_7.is_empty() {
   95     96   
                let header_value = formatted_7;
   96     97   
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   97     98   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
   98     99   
                        "optional_object_attributes",
   99    100   
                        format!("`{}` cannot be used as a header value: {}", &header_value, err),
  100    101   
                    )
  101    102   
                })?;
  102    103   
                builder = builder.header("x-amz-optional-object-attributes", header_value);
  103    104   
            }
  104    105   
        }

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

@@ -38,38 +124,125 @@
   58     58   
        output.build()
   59     59   
    })
   60     60   
}
   61     61   
   62     62   
pub fn ser_list_objects_v2_headers(
   63     63   
    input: &crate::operation::list_objects_v2::ListObjectsV2Input,
   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  +
        if !formatted_2.is_empty() {
   68     69   
            let header_value = formatted_2;
   69     70   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   70     71   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   71     72   
                    "request_payer",
   72     73   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   73     74   
                )
   74     75   
            })?;
   75     76   
            builder = builder.header("x-amz-request-payer", header_value);
   76     77   
        }
          78  +
    }
   77     79   
    if let ::std::option::Option::Some(inner_3) = &input.expected_bucket_owner {
   78     80   
        let formatted_4 = inner_3.as_str();
          81  +
        if !formatted_4.is_empty() {
   79     82   
            let header_value = formatted_4;
   80     83   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   81     84   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   82     85   
                    "expected_bucket_owner",
   83     86   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   84     87   
                )
   85     88   
            })?;
   86     89   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   87     90   
        }
          91  +
    }
   88     92   
    if let ::std::option::Option::Some(inner_5) = &input.optional_object_attributes {
   89         -
        // Empty vec in header is serialized as an empty string
   90         -
        if inner_5.is_empty() {
   91         -
            builder = builder.header("x-amz-optional-object-attributes", "");
   92         -
        } else {
   93     93   
        for inner_6 in inner_5 {
   94     94   
            let formatted_7 = ::aws_smithy_http::header::quote_header_value(inner_6.as_str());
          95  +
            if !formatted_7.is_empty() {
   95     96   
                let header_value = formatted_7;
   96     97   
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   97     98   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
   98     99   
                        "optional_object_attributes",
   99    100   
                        format!("`{}` cannot be used as a header value: {}", &header_value, err),
  100    101   
                    )
  101    102   
                })?;
  102    103   
                builder = builder.header("x-amz-optional-object-attributes", header_value);
  103    104   
            }
  104    105   
        }

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

@@ -24,24 +136,146 @@
   44     44   
        output.build()
   45     45   
    })
   46     46   
}
   47     47   
   48     48   
pub fn ser_list_parts_headers(
   49     49   
    input: &crate::operation::list_parts::ListPartsInput,
   50     50   
    mut builder: ::http::request::Builder,
   51     51   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   52     52   
    if let ::std::option::Option::Some(inner_1) = &input.request_payer {
   53     53   
        let formatted_2 = inner_1.as_str();
          54  +
        if !formatted_2.is_empty() {
   54     55   
            let header_value = formatted_2;
   55     56   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   56     57   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   57     58   
                    "request_payer",
   58     59   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   59     60   
                )
   60     61   
            })?;
   61     62   
            builder = builder.header("x-amz-request-payer", header_value);
   62     63   
        }
          64  +
    }
   63     65   
    if let ::std::option::Option::Some(inner_3) = &input.expected_bucket_owner {
   64     66   
        let formatted_4 = inner_3.as_str();
          67  +
        if !formatted_4.is_empty() {
   65     68   
            let header_value = formatted_4;
   66     69   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   67     70   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   68     71   
                    "expected_bucket_owner",
   69     72   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   70     73   
                )
   71     74   
            })?;
   72     75   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   73     76   
        }
          77  +
    }
   74     78   
    if let ::std::option::Option::Some(inner_5) = &input.sse_customer_algorithm {
   75     79   
        let formatted_6 = inner_5.as_str();
          80  +
        if !formatted_6.is_empty() {
   76     81   
            let header_value = formatted_6;
   77     82   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   78     83   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   79     84   
                    "sse_customer_algorithm",
   80     85   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   81     86   
                )
   82     87   
            })?;
   83     88   
            builder = builder.header("x-amz-server-side-encryption-customer-algorithm", header_value);
   84     89   
        }
          90  +
    }
   85     91   
    if let ::std::option::Option::Some(inner_7) = &input.sse_customer_key {
   86     92   
        let formatted_8 = inner_7.as_str();
          93  +
        if !formatted_8.is_empty() {
   87     94   
            let header_value = formatted_8;
   88     95   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   89     96   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   90     97   
                    "sse_customer_key",
   91     98   
                    format!("`{}` cannot be used as a header value: {}", &"*** Sensitive Data Redacted ***", err),
   92     99   
                )
   93    100   
            })?;
   94    101   
            builder = builder.header("x-amz-server-side-encryption-customer-key", header_value);
   95    102   
        }
         103  +
    }
   96    104   
    if let ::std::option::Option::Some(inner_9) = &input.sse_customer_key_md5 {
   97    105   
        let formatted_10 = inner_9.as_str();
         106  +
        if !formatted_10.is_empty() {
   98    107   
            let header_value = formatted_10;
   99    108   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  100    109   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  101    110   
                    "sse_customer_key_md5",
  102    111   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  103    112   
                )
  104    113   
            })?;
  105    114   
            builder = builder.header("x-amz-server-side-encryption-customer-key-MD5", header_value);
  106    115   
        }
         116  +
    }
  107    117   
    Ok(builder)
  108    118   
}
  109    119   
  110    120   
#[allow(unused_mut)]
  111    121   
pub fn de_list_parts(
  112    122   
    inp: &[u8],
  113    123   
    mut builder: crate::operation::list_parts::builders::ListPartsOutputBuilder,
  114    124   
) -> Result<crate::operation::list_parts::builders::ListPartsOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
  115    125   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
  116    126   

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

@@ -14,14 +65,69 @@
   34     34   
        output.build()
   35     35   
    })
   36     36   
}
   37     37   
   38     38   
pub fn ser_put_bucket_accelerate_configuration_headers(
   39     39   
    input: &crate::operation::put_bucket_accelerate_configuration::PutBucketAccelerateConfigurationInput,
   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.expected_bucket_owner {
   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   
                    "expected_bucket_owner",
   48     49   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   49     50   
                )
   50     51   
            })?;
   51     52   
            builder = builder.header("x-amz-expected-bucket-owner", 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   
    Ok(builder)
   65     69   
}

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

@@ -8,8 +136,154 @@
   28     28   
        output.build()
   29     29   
    })
   30     30   
}
   31     31   
   32     32   
pub fn ser_put_bucket_acl_headers(
   33     33   
    input: &crate::operation::put_bucket_acl::PutBucketAclInput,
   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.acl {
   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   
                    "acl",
   42     43   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   43     44   
                )
   44     45   
            })?;
   45     46   
            builder = builder.header("x-amz-acl", header_value);
   46     47   
        }
          48  +
    }
   47     49   
    if let ::std::option::Option::Some(inner_3) = &input.content_md5 {
   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   
                    "content_md5",
   53     56   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   54     57   
                )
   55     58   
            })?;
   56     59   
            builder = builder.header("Content-MD5", header_value);
   57     60   
        }
          61  +
    }
   58     62   
    if let ::std::option::Option::Some(inner_5) = &input.checksum_algorithm {
   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   
                    "checksum_algorithm",
   64     69   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   65     70   
                )
   66     71   
            })?;
   67     72   
            builder = builder.header("x-amz-sdk-checksum-algorithm", header_value);
   68     73   
        }
          74  +
    }
   69     75   
    if let ::std::option::Option::Some(inner_7) = &input.grant_full_control {
   70     76   
        let formatted_8 = inner_7.as_str();
          77  +
        if !formatted_8.is_empty() {
   71     78   
            let header_value = formatted_8;
   72     79   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   73     80   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   74     81   
                    "grant_full_control",
   75     82   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   76     83   
                )
   77     84   
            })?;
   78     85   
            builder = builder.header("x-amz-grant-full-control", header_value);
   79     86   
        }
          87  +
    }
   80     88   
    if let ::std::option::Option::Some(inner_9) = &input.grant_read {
   81     89   
        let formatted_10 = inner_9.as_str();
          90  +
        if !formatted_10.is_empty() {
   82     91   
            let header_value = formatted_10;
   83     92   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   84     93   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   85     94   
                    "grant_read",
   86     95   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   87     96   
                )
   88     97   
            })?;
   89     98   
            builder = builder.header("x-amz-grant-read", header_value);
   90     99   
        }
         100  +
    }
   91    101   
    if let ::std::option::Option::Some(inner_11) = &input.grant_read_acp {
   92    102   
        let formatted_12 = inner_11.as_str();
         103  +
        if !formatted_12.is_empty() {
   93    104   
            let header_value = formatted_12;
   94    105   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   95    106   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   96    107   
                    "grant_read_acp",
   97    108   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   98    109   
                )
   99    110   
            })?;
  100    111   
            builder = builder.header("x-amz-grant-read-acp", header_value);
  101    112   
        }
         113  +
    }
  102    114   
    if let ::std::option::Option::Some(inner_13) = &input.grant_write {
  103    115   
        let formatted_14 = inner_13.as_str();
         116  +
        if !formatted_14.is_empty() {
  104    117   
            let header_value = formatted_14;
  105    118   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  106    119   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  107    120   
                    "grant_write",
  108    121   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  109    122   
                )
  110    123   
            })?;
  111    124   
            builder = builder.header("x-amz-grant-write", header_value);
  112    125   
        }
         126  +
    }
  113    127   
    if let ::std::option::Option::Some(inner_15) = &input.grant_write_acp {
  114    128   
        let formatted_16 = inner_15.as_str();
         129  +
        if !formatted_16.is_empty() {
  115    130   
            let header_value = formatted_16;
  116    131   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  117    132   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  118    133   
                    "grant_write_acp",
  119    134   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  120    135   
                )
  121    136   
            })?;
  122    137   
            builder = builder.header("x-amz-grant-write-acp", header_value);
  123    138   
        }
         139  +
    }
  124    140   
    if let ::std::option::Option::Some(inner_17) = &input.expected_bucket_owner {
  125    141   
        let formatted_18 = inner_17.as_str();
         142  +
        if !formatted_18.is_empty() {
  126    143   
            let header_value = formatted_18;
  127    144   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  128    145   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  129    146   
                    "expected_bucket_owner",
  130    147   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
  131    148   
                )
  132    149   
            })?;
  133    150   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
  134    151   
        }
         152  +
    }
  135    153   
    Ok(builder)
  136    154   
}

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

@@ -14,14 +54,56 @@
   34     34   
        output.build()
   35     35   
    })
   36     36   
}
   37     37   
   38     38   
pub fn ser_put_bucket_analytics_configuration_headers(
   39     39   
    input: &crate::operation::put_bucket_analytics_configuration::PutBucketAnalyticsConfigurationInput,
   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.expected_bucket_owner {
   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   
                    "expected_bucket_owner",
   48     49   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   49     50   
                )
   50     51   
            })?;
   51     52   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   52     53   
        }
          54  +
    }
   53     55   
    Ok(builder)
   54     56   
}

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

@@ -8,8 +70,76 @@
   28     28   
        output.build()
   29     29   
    })
   30     30   
}
   31     31   
   32     32   
pub fn ser_put_bucket_cors_headers(
   33     33   
    input: &crate::operation::put_bucket_cors::PutBucketCorsInput,
   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_encryption.rs

@@ -14,14 +76,82 @@
   34     34   
        output.build()
   35     35   
    })
   36     36   
}
   37     37   
   38     38   
pub fn ser_put_bucket_encryption_headers(
   39     39   
    input: &crate::operation::put_bucket_encryption::PutBucketEncryptionInput,
   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_put_bucket_inventory_configuration.rs

@@ -14,14 +54,56 @@
   34     34   
        output.build()
   35     35   
    })
   36     36   
}
   37     37   
   38     38   
pub fn ser_put_bucket_inventory_configuration_headers(
   39     39   
    input: &crate::operation::put_bucket_inventory_configuration::PutBucketInventoryConfigurationInput,
   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.expected_bucket_owner {
   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   
                    "expected_bucket_owner",
   48     49   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   49     50   
                )
   50     51   
            })?;
   51     52   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   52     53   
        }
          54  +
    }
   53     55   
    Ok(builder)
   54     56   
}

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

@@ -14,14 +65,69 @@
   34     34   
        output.build()
   35     35   
    })
   36     36   
}
   37     37   
   38     38   
pub fn ser_put_bucket_lifecycle_configuration_headers(
   39     39   
    input: &crate::operation::put_bucket_lifecycle_configuration::PutBucketLifecycleConfigurationInput,
   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.checksum_algorithm {
   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   
                    "checksum_algorithm",
   48     49   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   49     50   
                )
   50     51   
            })?;
   51     52   
            builder = builder.header("x-amz-sdk-checksum-algorithm", header_value);
   52     53   
        }
          54  +
    }
   53     55   
    if let ::std::option::Option::Some(inner_3) = &input.expected_bucket_owner {
   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   
                    "expected_bucket_owner",
   59     62   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   60     63   
                )
   61     64   
            })?;
   62     65   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   63     66   
        }
          67  +
    }
   64     68   
    Ok(builder)
   65     69   
}

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

@@ -8,8 +70,76 @@
   28     28   
        output.build()
   29     29   
    })
   30     30   
}
   31     31   
   32     32   
pub fn ser_put_bucket_logging_headers(
   33     33   
    input: &crate::operation::put_bucket_logging::PutBucketLoggingInput,
   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_metrics_configuration.rs

@@ -14,14 +54,56 @@
   34     34   
        output.build()
   35     35   
    })
   36     36   
}
   37     37   
   38     38   
pub fn ser_put_bucket_metrics_configuration_headers(
   39     39   
    input: &crate::operation::put_bucket_metrics_configuration::PutBucketMetricsConfigurationInput,
   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.expected_bucket_owner {
   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   
                    "expected_bucket_owner",
   48     49   
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
   49     50   
                )
   50     51   
            })?;
   51     52   
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
   52     53   
        }
          54  +
    }
   53     55   
    Ok(builder)
   54     56   
}