1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /* RustType.kt:516 */
|
2 3 | #[allow(clippy::unnecessary_wraps)]
|
4 + | /* ProtocolParserGenerator.kt:99 */
|
3 5 | pub fn de_malformed_integer_http_error(
|
4 6 | _response_status: u16,
|
5 7 | _response_headers: &::aws_smithy_runtime_api::http::Headers,
|
6 8 | _response_body: &[u8],
|
7 9 | ) -> std::result::Result<crate::operation::malformed_integer::MalformedIntegerOutput, crate::operation::malformed_integer::MalformedIntegerError> {
|
10 + | /* RustType.kt:516 */
|
8 11 | #[allow(unused_mut)]
|
12 + | /* ProtocolParserGenerator.kt:106 */
|
9 13 | let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
|
10 14 | .map_err(crate::operation::malformed_integer::MalformedIntegerError::unhandled)?;
|
15 + | /* ProtocolParserGenerator.kt:120 */
|
11 16 | let generic = generic_builder.build();
|
17 + | /* ProtocolParserGenerator.kt:185 */
|
12 18 | Err(crate::operation::malformed_integer::MalformedIntegerError::generic(generic))
|
19 + | /* ProtocolParserGenerator.kt:99 */
|
13 20 | }
|
14 21 |
|
22 + | /* RustType.kt:516 */
|
15 23 | #[allow(clippy::unnecessary_wraps)]
|
24 + | /* ProtocolParserGenerator.kt:71 */
|
16 25 | pub fn de_malformed_integer_http_response(
|
17 26 | _response_status: u16,
|
18 27 | _response_headers: &::aws_smithy_runtime_api::http::Headers,
|
19 28 | _response_body: &[u8],
|
20 29 | ) -> std::result::Result<crate::operation::malformed_integer::MalformedIntegerOutput, crate::operation::malformed_integer::MalformedIntegerError> {
|
30 + | /* ProtocolParserGenerator.kt:77 */
|
21 31 | Ok({
|
32 + | /* RustType.kt:516 */
|
22 33 | #[allow(unused_mut)]
|
34 + | /* ProtocolParserGenerator.kt:240 */
|
23 35 | let mut output = crate::operation::malformed_integer::builders::MalformedIntegerOutputBuilder::default();
|
36 + | /* ClientBuilderInstantiator.kt:56 */
|
24 37 | output.build()
|
38 + | /* ProtocolParserGenerator.kt:77 */
|
25 39 | })
|
40 + | /* ProtocolParserGenerator.kt:71 */
|
26 41 | }
|
27 42 |
|
43 + | /* HttpBindingGenerator.kt:542 */
|
28 44 | pub fn ser_malformed_integer_headers(
|
29 45 | input: &crate::operation::malformed_integer::MalformedIntegerInput,
|
30 46 | mut builder: ::http::request::Builder,
|
31 47 | ) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
48 + | /* HttpBindingGenerator.kt:592 */
|
32 49 | if let ::std::option::Option::Some(inner_1) = &input.integer_in_header {
|
50 + | /* HttpBindingGenerator.kt:690 */
|
33 51 | let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_1);
|
52 + | /* HttpBindingGenerator.kt:704 */
|
34 53 | let formatted_2 = encoder.encode();
|
54 + | /* HttpBindingGenerator.kt:706 */
|
35 55 | let header_value = formatted_2;
|
36 56 | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
37 57 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
38 58 | "integer_in_header",
|
39 59 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
40 60 | )
|
41 61 | })?;
|
42 62 | builder = builder.header("integerInHeader", header_value);
|
63 + | /* HttpBindingGenerator.kt:592 */
|
43 64 | }
|
65 + | /* HttpBindingGenerator.kt:555 */
|
44 66 | Ok(builder)
|
67 + | /* HttpBindingGenerator.kt:542 */
|
45 68 | }
|
46 69 |
|
70 + | /* JsonSerializerGenerator.kt:287 */
|
47 71 | pub fn ser_malformed_integer_input(
|
48 72 | input: &crate::operation::malformed_integer::MalformedIntegerInput,
|
49 73 | ) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
|
74 + | /* JsonSerializerGenerator.kt:291 */
|
50 75 | let mut out = String::new();
|
76 + | /* JsonSerializerGenerator.kt:292 */
|
51 77 | let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
|
78 + | /* JsonSerializerGenerator.kt:375 */
|
52 79 | crate::protocol_serde::shape_malformed_integer_input::ser_malformed_integer_input_input(&mut object, input)?;
|
80 + | /* JsonSerializerGenerator.kt:295 */
|
53 81 | object.finish();
|
82 + | /* JsonSerializerGenerator.kt:296 */
|
54 83 | Ok(::aws_smithy_types::body::SdkBody::from(out))
|
84 + | /* JsonSerializerGenerator.kt:287 */
|
55 85 | }
|