aws_sdk_s3/protocol_serde/
shape_upload_part_output.rs
1pub(crate) fn de_bucket_key_enabled_header(
3 header_map: &::aws_smithy_runtime_api::http::Headers,
4) -> ::std::result::Result<::std::option::Option<bool>, ::aws_smithy_http::header::ParseError> {
5 let headers = header_map.get_all("x-amz-server-side-encryption-bucket-key-enabled");
6 let var_1 = ::aws_smithy_http::header::read_many_primitive::<bool>(headers)?;
7 if var_1.len() > 1 {
8 Err(::aws_smithy_http::header::ParseError::new(format!(
9 "expected one item but found {}",
10 var_1.len()
11 )))
12 } else {
13 let mut var_1 = var_1;
14 Ok(var_1.pop())
15 }
16}
17
18pub(crate) fn de_checksum_crc32_header(
19 header_map: &::aws_smithy_runtime_api::http::Headers,
20) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
21 let headers = header_map.get_all("x-amz-checksum-crc32");
22 ::aws_smithy_http::header::one_or_none(headers)
23}
24
25pub(crate) fn de_checksum_crc32_c_header(
26 header_map: &::aws_smithy_runtime_api::http::Headers,
27) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
28 let headers = header_map.get_all("x-amz-checksum-crc32c");
29 ::aws_smithy_http::header::one_or_none(headers)
30}
31
32pub(crate) fn de_checksum_crc64_nvme_header(
33 header_map: &::aws_smithy_runtime_api::http::Headers,
34) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
35 let headers = header_map.get_all("x-amz-checksum-crc64nvme");
36 ::aws_smithy_http::header::one_or_none(headers)
37}
38
39pub(crate) fn de_checksum_sha1_header(
40 header_map: &::aws_smithy_runtime_api::http::Headers,
41) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
42 let headers = header_map.get_all("x-amz-checksum-sha1");
43 ::aws_smithy_http::header::one_or_none(headers)
44}
45
46pub(crate) fn de_checksum_sha256_header(
47 header_map: &::aws_smithy_runtime_api::http::Headers,
48) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
49 let headers = header_map.get_all("x-amz-checksum-sha256");
50 ::aws_smithy_http::header::one_or_none(headers)
51}
52
53pub(crate) fn de_e_tag_header(
54 header_map: &::aws_smithy_runtime_api::http::Headers,
55) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
56 let headers = header_map.get_all("ETag");
57 ::aws_smithy_http::header::one_or_none(headers)
58}
59
60pub(crate) fn de_request_charged_header(
61 header_map: &::aws_smithy_runtime_api::http::Headers,
62) -> ::std::result::Result<::std::option::Option<crate::types::RequestCharged>, ::aws_smithy_http::header::ParseError> {
63 let headers = header_map.get_all("x-amz-request-charged");
64 ::aws_smithy_http::header::one_or_none(headers)
65}
66
67pub(crate) fn de_sse_customer_algorithm_header(
68 header_map: &::aws_smithy_runtime_api::http::Headers,
69) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
70 let headers = header_map.get_all("x-amz-server-side-encryption-customer-algorithm");
71 ::aws_smithy_http::header::one_or_none(headers)
72}
73
74pub(crate) fn de_sse_customer_key_md5_header(
75 header_map: &::aws_smithy_runtime_api::http::Headers,
76) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
77 let headers = header_map.get_all("x-amz-server-side-encryption-customer-key-MD5");
78 ::aws_smithy_http::header::one_or_none(headers)
79}
80
81pub(crate) fn de_ssekms_key_id_header(
82 header_map: &::aws_smithy_runtime_api::http::Headers,
83) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
84 let headers = header_map.get_all("x-amz-server-side-encryption-aws-kms-key-id");
85 ::aws_smithy_http::header::one_or_none(headers)
86}
87
88pub(crate) fn de_server_side_encryption_header(
89 header_map: &::aws_smithy_runtime_api::http::Headers,
90) -> ::std::result::Result<::std::option::Option<crate::types::ServerSideEncryption>, ::aws_smithy_http::header::ParseError> {
91 let headers = header_map.get_all("x-amz-server-side-encryption");
92 ::aws_smithy_http::header::one_or_none(headers)
93}