aws_sdk_s3/protocol_serde/
shape_put_object_output.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub(crate) fn de_bucket_key_enabled_header(
    header_map: &::aws_smithy_runtime_api::http::Headers,
) -> ::std::result::Result<::std::option::Option<bool>, ::aws_smithy_http::header::ParseError> {
    let headers = header_map.get_all("x-amz-server-side-encryption-bucket-key-enabled");
    let var_1 = ::aws_smithy_http::header::read_many_primitive::<bool>(headers)?;
    if var_1.len() > 1 {
        Err(::aws_smithy_http::header::ParseError::new(format!(
            "expected one item but found {}",
            var_1.len()
        )))
    } else {
        let mut var_1 = var_1;
        Ok(var_1.pop())
    }
}

pub(crate) fn de_checksum_crc32_header(
    header_map: &::aws_smithy_runtime_api::http::Headers,
) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
    let headers = header_map.get_all("x-amz-checksum-crc32");
    ::aws_smithy_http::header::one_or_none(headers)
}

pub(crate) fn de_checksum_crc32_c_header(
    header_map: &::aws_smithy_runtime_api::http::Headers,
) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
    let headers = header_map.get_all("x-amz-checksum-crc32c");
    ::aws_smithy_http::header::one_or_none(headers)
}

pub(crate) fn de_checksum_sha1_header(
    header_map: &::aws_smithy_runtime_api::http::Headers,
) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
    let headers = header_map.get_all("x-amz-checksum-sha1");
    ::aws_smithy_http::header::one_or_none(headers)
}

pub(crate) fn de_checksum_sha256_header(
    header_map: &::aws_smithy_runtime_api::http::Headers,
) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
    let headers = header_map.get_all("x-amz-checksum-sha256");
    ::aws_smithy_http::header::one_or_none(headers)
}

pub(crate) fn de_e_tag_header(
    header_map: &::aws_smithy_runtime_api::http::Headers,
) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
    let headers = header_map.get_all("ETag");
    ::aws_smithy_http::header::one_or_none(headers)
}

pub(crate) fn de_expiration_header(
    header_map: &::aws_smithy_runtime_api::http::Headers,
) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
    let headers = header_map.get_all("x-amz-expiration");
    ::aws_smithy_http::header::one_or_none(headers)
}

pub(crate) fn de_request_charged_header(
    header_map: &::aws_smithy_runtime_api::http::Headers,
) -> ::std::result::Result<::std::option::Option<crate::types::RequestCharged>, ::aws_smithy_http::header::ParseError> {
    let headers = header_map.get_all("x-amz-request-charged");
    ::aws_smithy_http::header::one_or_none(headers)
}

pub(crate) fn de_sse_customer_algorithm_header(
    header_map: &::aws_smithy_runtime_api::http::Headers,
) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
    let headers = header_map.get_all("x-amz-server-side-encryption-customer-algorithm");
    ::aws_smithy_http::header::one_or_none(headers)
}

pub(crate) fn de_sse_customer_key_md5_header(
    header_map: &::aws_smithy_runtime_api::http::Headers,
) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
    let headers = header_map.get_all("x-amz-server-side-encryption-customer-key-MD5");
    ::aws_smithy_http::header::one_or_none(headers)
}

pub(crate) fn de_ssekms_encryption_context_header(
    header_map: &::aws_smithy_runtime_api::http::Headers,
) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
    let headers = header_map.get_all("x-amz-server-side-encryption-context");
    ::aws_smithy_http::header::one_or_none(headers)
}

pub(crate) fn de_ssekms_key_id_header(
    header_map: &::aws_smithy_runtime_api::http::Headers,
) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
    let headers = header_map.get_all("x-amz-server-side-encryption-aws-kms-key-id");
    ::aws_smithy_http::header::one_or_none(headers)
}

pub(crate) fn de_server_side_encryption_header(
    header_map: &::aws_smithy_runtime_api::http::Headers,
) -> ::std::result::Result<::std::option::Option<crate::types::ServerSideEncryption>, ::aws_smithy_http::header::ParseError> {
    let headers = header_map.get_all("x-amz-server-side-encryption");
    ::aws_smithy_http::header::one_or_none(headers)
}

pub(crate) fn de_version_id_header(
    header_map: &::aws_smithy_runtime_api::http::Headers,
) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
    let headers = header_map.get_all("x-amz-version-id");
    ::aws_smithy_http::header::one_or_none(headers)
}