AWS SDK

AWS SDK

rev. 000b37a512bd3be1a17b4f3d5bf60e5446dbc2dd

Files changed:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -50,50 +195,211 @@
   70     70   
        output.build()
   71     71   
    })
   72     72   
}
   73     73   
   74     74   
pub fn ser_create_bucket_headers(
   75     75   
    input: &crate::operation::create_bucket::CreateBucketInput,
   76     76   
    mut builder: ::http::request::Builder,
   77     77   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   78     78   
    if let ::std::option::Option::Some(inner_1) = &input.acl {
   79     79   
        let formatted_2 = inner_1.as_str();
   80         -
        let header_value = formatted_2;
   81         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   82         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   83         -
                "acl",
   84         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   85         -
            )
   86         -
        })?;
   87         -
        builder = builder.header("x-amz-acl", header_value);
          80  +
        if !formatted_2.is_empty() {
          81  +
            let header_value = formatted_2;
          82  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          83  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          84  +
                    "acl",
          85  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          86  +
                )
          87  +
            })?;
          88  +
            builder = builder.header("x-amz-acl", header_value);
          89  +
        }
   88     90   
    }
   89     91   
    if let ::std::option::Option::Some(inner_3) = &input.grant_full_control {
   90     92   
        let formatted_4 = inner_3.as_str();
   91         -
        let header_value = formatted_4;
   92         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   93         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   94         -
                "grant_full_control",
   95         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   96         -
            )
   97         -
        })?;
   98         -
        builder = builder.header("x-amz-grant-full-control", header_value);
          93  +
        if !formatted_4.is_empty() {
          94  +
            let header_value = formatted_4;
          95  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
          96  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
          97  +
                    "grant_full_control",
          98  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
          99  +
                )
         100  +
            })?;
         101  +
            builder = builder.header("x-amz-grant-full-control", header_value);
         102  +
        }
   99    103   
    }
  100    104   
    if let ::std::option::Option::Some(inner_5) = &input.grant_read {
  101    105   
        let formatted_6 = inner_5.as_str();
  102         -
        let header_value = formatted_6;
  103         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  104         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  105         -
                "grant_read",
  106         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  107         -
            )
  108         -
        })?;
  109         -
        builder = builder.header("x-amz-grant-read", header_value);
         106  +
        if !formatted_6.is_empty() {
         107  +
            let header_value = formatted_6;
         108  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         109  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         110  +
                    "grant_read",
         111  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         112  +
                )
         113  +
            })?;
         114  +
            builder = builder.header("x-amz-grant-read", header_value);
         115  +
        }
  110    116   
    }
  111    117   
    if let ::std::option::Option::Some(inner_7) = &input.grant_read_acp {
  112    118   
        let formatted_8 = inner_7.as_str();
  113         -
        let header_value = formatted_8;
  114         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  115         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  116         -
                "grant_read_acp",
  117         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  118         -
            )
  119         -
        })?;
  120         -
        builder = builder.header("x-amz-grant-read-acp", header_value);
         119  +
        if !formatted_8.is_empty() {
         120  +
            let header_value = formatted_8;
         121  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         122  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         123  +
                    "grant_read_acp",
         124  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         125  +
                )
         126  +
            })?;
         127  +
            builder = builder.header("x-amz-grant-read-acp", header_value);
         128  +
        }
  121    129   
    }
  122    130   
    if let ::std::option::Option::Some(inner_9) = &input.grant_write {
  123    131   
        let formatted_10 = inner_9.as_str();
  124         -
        let header_value = formatted_10;
  125         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  126         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  127         -
                "grant_write",
  128         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  129         -
            )
  130         -
        })?;
  131         -
        builder = builder.header("x-amz-grant-write", header_value);
         132  +
        if !formatted_10.is_empty() {
         133  +
            let header_value = formatted_10;
         134  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         135  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         136  +
                    "grant_write",
         137  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         138  +
                )
         139  +
            })?;
         140  +
            builder = builder.header("x-amz-grant-write", header_value);
         141  +
        }
  132    142   
    }
  133    143   
    if let ::std::option::Option::Some(inner_11) = &input.grant_write_acp {
  134    144   
        let formatted_12 = inner_11.as_str();
  135         -
        let header_value = formatted_12;
  136         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  137         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  138         -
                "grant_write_acp",
  139         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  140         -
            )
  141         -
        })?;
  142         -
        builder = builder.header("x-amz-grant-write-acp", header_value);
         145  +
        if !formatted_12.is_empty() {
         146  +
            let header_value = formatted_12;
         147  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         148  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         149  +
                    "grant_write_acp",
         150  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         151  +
                )
         152  +
            })?;
         153  +
            builder = builder.header("x-amz-grant-write-acp", header_value);
         154  +
        }
  143    155   
    }
  144    156   
    if let ::std::option::Option::Some(inner_13) = &input.object_lock_enabled_for_bucket {
  145    157   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_13);
  146    158   
        let formatted_14 = encoder.encode();
  147         -
        let header_value = formatted_14;
  148         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  149         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  150         -
                "object_lock_enabled_for_bucket",
  151         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  152         -
            )
  153         -
        })?;
  154         -
        builder = builder.header("x-amz-bucket-object-lock-enabled", header_value);
         159  +
        if !formatted_14.is_empty() {
         160  +
            let header_value = formatted_14;
         161  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         162  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         163  +
                    "object_lock_enabled_for_bucket",
         164  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         165  +
                )
         166  +
            })?;
         167  +
            builder = builder.header("x-amz-bucket-object-lock-enabled", header_value);
         168  +
        }
  155    169   
    }
  156    170   
    if let ::std::option::Option::Some(inner_15) = &input.outpost_id {
  157    171   
        let formatted_16 = inner_15.as_str();
  158         -
        let header_value = formatted_16;
  159         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  160         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  161         -
                "outpost_id",
  162         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  163         -
            )
  164         -
        })?;
  165         -
        builder = builder.header("x-amz-outpost-id", header_value);
         172  +
        if !formatted_16.is_empty() {
         173  +
            let header_value = formatted_16;
         174  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         175  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         176  +
                    "outpost_id",
         177  +
                    format!("`{}` cannot be used as a header value: {}", &header_value, err),
         178  +
                )
         179  +
            })?;
         180  +
            builder = builder.header("x-amz-outpost-id", header_value);
         181  +
        }
  166    182   
    }
  167    183   
    Ok(builder)
  168    184   
}
  169    185   
  170    186   
#[allow(unused_mut)]
  171    187   
pub fn de_create_bucket(
  172    188   
    inp: &[u8],
  173    189   
    mut builder: crate::operation::create_bucket::builders::CreateBucketOutputBuilder,
  174    190   
) -> Result<crate::operation::create_bucket::builders::CreateBucketOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
  175    191   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;

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

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

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

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

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

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

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

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