AWS SDK

AWS SDK

rev. 000b37a512bd3be1a17b4f3d5bf60e5446dbc2dd

Files changed:

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

@@ -21,21 +61,63 @@
   41     41   
        output.build()
   42     42   
    })
   43     43   
}
   44     44   
   45     45   
pub fn ser_delete_object_tagging_headers(
   46     46   
    input: &crate::operation::delete_object_tagging::DeleteObjectTaggingInput,
   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.expected_bucket_owner {
   50     50   
        let formatted_2 = inner_1.as_str();
   51         -
        let header_value = formatted_2;
   52         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   53         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   54         -
                "expected_bucket_owner",
   55         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   56         -
            )
   57         -
        })?;
   58         -
        builder = builder.header("x-amz-expected-bucket-owner", header_value);
          51  +
        if !formatted_2.is_empty() {
          52  +
            let header_value = formatted_2;
          53  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          54  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          55  +
                    "expected_bucket_owner",
          56  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          57  +
                )
          58  +
            })?;
          59  +
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
          60  +
        }
   59     61   
    }
   60     62   
    Ok(builder)
   61     63   
}

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

@@ -15,15 +127,137 @@
   35     35   
        output.build()
   36     36   
    })
   37     37   
}
   38     38   
   39     39   
pub fn ser_delete_objects_headers(
   40     40   
    input: &crate::operation::delete_objects::DeleteObjectsInput,
   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.mfa {
   44     44   
        let formatted_2 = inner_1.as_str();
   45         -
        let header_value = formatted_2;
   46         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   47         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   48         -
                "mfa",
   49         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   50         -
            )
   51         -
        })?;
   52         -
        builder = builder.header("x-amz-mfa", header_value);
          45  +
        if !formatted_2.is_empty() {
          46  +
            let header_value = formatted_2;
          47  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          48  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          49  +
                    "mfa",
          50  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          51  +
                )
          52  +
            })?;
          53  +
            builder = builder.header("x-amz-mfa", header_value);
          54  +
        }
   53     55   
    }
   54     56   
    if let ::std::option::Option::Some(inner_3) = &input.request_payer {
   55     57   
        let formatted_4 = inner_3.as_str();
   56         -
        let header_value = formatted_4;
   57         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   58         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   59         -
                "request_payer",
   60         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   61         -
            )
   62         -
        })?;
   63         -
        builder = builder.header("x-amz-request-payer", header_value);
          58  +
        if !formatted_4.is_empty() {
          59  +
            let header_value = formatted_4;
          60  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          61  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          62  +
                    "request_payer",
          63  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          64  +
                )
          65  +
            })?;
          66  +
            builder = builder.header("x-amz-request-payer", header_value);
          67  +
        }
   64     68   
    }
   65     69   
    if let ::std::option::Option::Some(inner_5) = &input.bypass_governance_retention {
   66     70   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_5);
   67     71   
        let formatted_6 = encoder.encode();
   68         -
        let header_value = formatted_6;
   69         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   70         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   71         -
                "bypass_governance_retention",
   72         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   73         -
            )
   74         -
        })?;
   75         -
        builder = builder.header("x-amz-bypass-governance-retention", header_value);
          72  +
        if !formatted_6.is_empty() {
          73  +
            let header_value = formatted_6;
          74  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          75  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          76  +
                    "bypass_governance_retention",
          77  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          78  +
                )
          79  +
            })?;
          80  +
            builder = builder.header("x-amz-bypass-governance-retention", header_value);
          81  +
        }
   76     82   
    }
   77     83   
    if let ::std::option::Option::Some(inner_7) = &input.expected_bucket_owner {
   78     84   
        let formatted_8 = inner_7.as_str();
   79         -
        let header_value = formatted_8;
   80         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   81         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   82         -
                "expected_bucket_owner",
   83         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   84         -
            )
   85         -
        })?;
   86         -
        builder = builder.header("x-amz-expected-bucket-owner", header_value);
          85  +
        if !formatted_8.is_empty() {
          86  +
            let header_value = formatted_8;
          87  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          88  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          89  +
                    "expected_bucket_owner",
          90  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          91  +
                )
          92  +
            })?;
          93  +
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
          94  +
        }
   87     95   
    }
   88     96   
    if let ::std::option::Option::Some(inner_9) = &input.checksum_algorithm {
   89     97   
        let formatted_10 = inner_9.as_str();
   90         -
        let header_value = formatted_10;
   91         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   92         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   93         -
                "checksum_algorithm",
   94         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   95         -
            )
   96         -
        })?;
   97         -
        builder = builder.header("x-amz-sdk-checksum-algorithm", header_value);
          98  +
        if !formatted_10.is_empty() {
          99  +
            let header_value = formatted_10;
         100  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         101  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         102  +
                    "checksum_algorithm",
         103  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         104  +
                )
         105  +
            })?;
         106  +
            builder = builder.header("x-amz-sdk-checksum-algorithm", header_value);
         107  +
        }
   98    108   
    }
   99    109   
    Ok(builder)
  100    110   
}
  101    111   
  102    112   
#[allow(unused_mut)]
  103    113   
pub fn de_delete_objects(
  104    114   
    inp: &[u8],
  105    115   
    mut builder: crate::operation::delete_objects::builders::DeleteObjectsOutputBuilder,
  106    116   
) -> Result<crate::operation::delete_objects::builders::DeleteObjectsOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
  107    117   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;

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

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

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

@@ -23,23 +101,105 @@
   43     43   
        output.build()
   44     44   
    })
   45     45   
}
   46     46   
   47     47   
pub fn ser_get_bucket_accelerate_configuration_headers(
   48     48   
    input: &crate::operation::get_bucket_accelerate_configuration::GetBucketAccelerateConfigurationInput,
   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         -
        let header_value = formatted_2;
   54         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   55         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   56         -
                "expected_bucket_owner",
   57         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   58         -
            )
   59         -
        })?;
   60         -
        builder = builder.header("x-amz-expected-bucket-owner", header_value);
          53  +
        if !formatted_2.is_empty() {
          54  +
            let header_value = formatted_2;
          55  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          56  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          57  +
                    "expected_bucket_owner",
          58  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          59  +
                )
          60  +
            })?;
          61  +
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
          62  +
        }
   61     63   
    }
   62     64   
    if let ::std::option::Option::Some(inner_3) = &input.request_payer {
   63     65   
        let formatted_4 = inner_3.as_str();
   64         -
        let header_value = formatted_4;
   65         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   66         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   67         -
                "request_payer",
   68         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   69         -
            )
   70         -
        })?;
   71         -
        builder = builder.header("x-amz-request-payer", header_value);
          66  +
        if !formatted_4.is_empty() {
          67  +
            let header_value = formatted_4;
          68  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          69  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          70  +
                    "request_payer",
          71  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          72  +
                )
          73  +
            })?;
          74  +
            builder = builder.header("x-amz-request-payer", header_value);
          75  +
        }
   72     76   
    }
   73     77   
    Ok(builder)
   74     78   
}
   75     79   
   76     80   
#[allow(unused_mut)]
   77     81   
pub fn de_get_bucket_accelerate_configuration(
   78     82   
    inp: &[u8],
   79     83   
    mut builder: crate::operation::get_bucket_accelerate_configuration::builders::GetBucketAccelerateConfigurationOutputBuilder,
   80     84   
) -> Result<
   81     85   
    crate::operation::get_bucket_accelerate_configuration::builders::GetBucketAccelerateConfigurationOutputBuilder,

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -12,12 +79,81 @@
   32     32   
        output.build()
   33     33   
    })
   34     34   
}
   35     35   
   36     36   
pub fn ser_get_bucket_location_headers(
   37     37   
    input: &crate::operation::get_bucket_location::GetBucketLocationInput,
   38     38   
    mut builder: ::http::request::Builder,
   39     39   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   40     40   
    if let ::std::option::Option::Some(inner_1) = &input.expected_bucket_owner {
   41     41   
        let formatted_2 = inner_1.as_str();
   42         -
        let header_value = formatted_2;
   43         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   44         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   45         -
                "expected_bucket_owner",
   46         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   47         -
            )
   48         -
        })?;
   49         -
        builder = builder.header("x-amz-expected-bucket-owner", header_value);
          42  +
        if !formatted_2.is_empty() {
          43  +
            let header_value = formatted_2;
          44  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          45  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          46  +
                    "expected_bucket_owner",
          47  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          48  +
                )
          49  +
            })?;
          50  +
            builder = builder.header("x-amz-expected-bucket-owner", header_value);
          51  +
        }
   50     52   
    }
   51     53   
    Ok(builder)
   52     54   
}
   53     55   
   54     56   
#[allow(unused_mut)]
   55     57   
pub fn de_get_bucket_location(
   56     58   
    inp: &[u8],
   57     59   
    mut builder: crate::operation::get_bucket_location::builders::GetBucketLocationOutputBuilder,
   58     60   
) -> Result<crate::operation::get_bucket_location::builders::GetBucketLocationOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
   59     61   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;

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

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

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

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

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

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

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

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

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

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