17 17 | }
|
18 18 |
|
19 19 | #[allow(clippy::unnecessary_wraps)]
|
20 20 | pub fn de_get_access_point_configuration_for_object_lambda_http_response(
|
21 21 | _response_status: u16,
|
22 22 | _response_headers: &::aws_smithy_runtime_api::http::Headers,
|
23 23 | _response_body: &[u8],
|
24 24 | ) -> std::result::Result<
|
25 25 | crate::operation::get_access_point_configuration_for_object_lambda::GetAccessPointConfigurationForObjectLambdaOutput,
|
26 26 | crate::operation::get_access_point_configuration_for_object_lambda::GetAccessPointConfigurationForObjectLambdaError,
|
27 27 | > {
|
28 28 | Ok({
|
29 29 | #[allow(unused_mut)]
|
30 30 | let mut output = crate::operation::get_access_point_configuration_for_object_lambda::builders::GetAccessPointConfigurationForObjectLambdaOutputBuilder::default();
|
31 31 | output = crate::protocol_serde::shape_get_access_point_configuration_for_object_lambda::de_get_access_point_configuration_for_object_lambda(
|
32 32 | _response_body,
|
33 33 | output,
|
34 34 | )
|
35 35 | .map_err(crate::operation::get_access_point_configuration_for_object_lambda::GetAccessPointConfigurationForObjectLambdaError::unhandled)?;
|
36 36 | output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
|
37 37 | output.build()
|
38 38 | })
|
39 39 | }
|
40 40 |
|
41 41 | pub fn ser_get_access_point_configuration_for_object_lambda_headers(
|
42 42 | input: &crate::operation::get_access_point_configuration_for_object_lambda::GetAccessPointConfigurationForObjectLambdaInput,
|
43 43 | mut builder: ::http::request::Builder,
|
44 44 | ) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
45 45 | if let ::std::option::Option::Some(inner_1) = &input.account_id {
|
46 46 | let formatted_2 = inner_1.as_str();
|
47 + | if !formatted_2.is_empty() {
|
47 48 | let header_value = formatted_2;
|
48 49 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
49 50 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
50 51 | "account_id",
|
51 52 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
52 53 | )
|
53 54 | })?;
|
54 55 | builder = builder.header("x-amz-account-id", header_value);
|
55 56 | }
|
57 + | }
|
56 58 | Ok(builder)
|
57 59 | }
|
58 60 |
|
59 61 | #[allow(unused_mut)]
|
60 62 | pub fn de_get_access_point_configuration_for_object_lambda(
|
61 63 | inp: &[u8],
|
62 64 | mut builder: crate::operation::get_access_point_configuration_for_object_lambda::builders::GetAccessPointConfigurationForObjectLambdaOutputBuilder,
|
63 65 | ) -> Result<
|
64 66 | crate::operation::get_access_point_configuration_for_object_lambda::builders::GetAccessPointConfigurationForObjectLambdaOutputBuilder,
|
65 67 | ::aws_smithy_xml::decode::XmlDecodeError,
|
66 68 | > {
|
67 69 | let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
|
68 70 |
|
69 71 | #[allow(unused_mut)]
|
70 72 | let mut decoder = doc.root_element()?;
|
71 73 | #[allow(unused_variables)]
|
72 74 | let start_el = decoder.start_el();
|
73 75 | if !start_el.matches("GetAccessPointConfigurationForObjectLambdaResult") {
|
74 76 | return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
|
75 77 | "encountered invalid XML root: expected GetAccessPointConfigurationForObjectLambdaResult but got {:?}. This is likely a bug in the SDK.",
|
76 78 | start_el
|
77 79 | )));
|
78 80 | }
|
79 81 | while let Some(mut tag) = decoder.next_tag() {
|
80 82 | match tag.start_el() {
|
81 83 | s if s.matches("Configuration") /* Configuration com.amazonaws.s3control.synthetic#GetAccessPointConfigurationForObjectLambdaOutput$Configuration */ => {
|
82 84 | let var_3 =
|
83 85 | Some(
|
84 86 | crate::protocol_serde::shape_object_lambda_configuration::de_object_lambda_configuration(&mut tag)
|
85 87 | ?
|