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
pub fn ser_delete_replication_configuration_template_input(
input: &crate::operation::delete_replication_configuration_template::DeleteReplicationConfigurationTemplateInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
let mut object = aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
crate::protocol_serde::shape_delete_replication_configuration_template_input::ser_delete_replication_configuration_template_input(&mut object, input)?;
object.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
#[allow(clippy::unnecessary_wraps)]
pub fn de_delete_replication_configuration_template_http_error(response: &http::Response<bytes::Bytes>) -> std::result::Result<crate::operation::delete_replication_configuration_template::DeleteReplicationConfigurationTemplateOutput, crate::operation::delete_replication_configuration_template::DeleteReplicationConfigurationTemplateError>{
#[allow(unused_mut)]
let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(response).map_err(crate::operation::delete_replication_configuration_template::DeleteReplicationConfigurationTemplateError::unhandled)?;
generic_builder = aws_http::request_id::apply_request_id(generic_builder, response.headers());
let generic = generic_builder.build();
let error_code = match generic.code() {
Some(code) => code,
None => return Err(crate::operation::delete_replication_configuration_template::DeleteReplicationConfigurationTemplateError::unhandled(generic))
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"ConflictException" => crate::operation::delete_replication_configuration_template::DeleteReplicationConfigurationTemplateError::ConflictException({
#[allow(unused_mut)]
let mut tmp =
{
#[allow(unused_mut)]
let mut output = crate::types::error::builders::ConflictExceptionBuilder::default();
let _ = response;
output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(response.body().as_ref(), output).map_err(crate::operation::delete_replication_configuration_template::DeleteReplicationConfigurationTemplateError::unhandled)?;
let output = output.meta(generic);
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
"ResourceNotFoundException" => crate::operation::delete_replication_configuration_template::DeleteReplicationConfigurationTemplateError::ResourceNotFoundException({
#[allow(unused_mut)]
let mut tmp =
{
#[allow(unused_mut)]
let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
let _ = response;
output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::operation::delete_replication_configuration_template::DeleteReplicationConfigurationTemplateError::unhandled)?;
let output = output.meta(generic);
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
"UninitializedAccountException" => crate::operation::delete_replication_configuration_template::DeleteReplicationConfigurationTemplateError::UninitializedAccountException({
#[allow(unused_mut)]
let mut tmp =
{
#[allow(unused_mut)]
let mut output = crate::types::error::builders::UninitializedAccountExceptionBuilder::default();
let _ = response;
output = crate::protocol_serde::shape_uninitialized_account_exception::de_uninitialized_account_exception_json_err(response.body().as_ref(), output).map_err(crate::operation::delete_replication_configuration_template::DeleteReplicationConfigurationTemplateError::unhandled)?;
let output = output.meta(generic);
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
_ => crate::operation::delete_replication_configuration_template::DeleteReplicationConfigurationTemplateError::generic(generic)
})
}
#[allow(clippy::unnecessary_wraps)]
pub fn de_delete_replication_configuration_template_http_response(response: &http::Response<bytes::Bytes>) -> std::result::Result<crate::operation::delete_replication_configuration_template::DeleteReplicationConfigurationTemplateOutput, crate::operation::delete_replication_configuration_template::DeleteReplicationConfigurationTemplateError>{
Ok({
#[allow(unused_mut)]
let mut output = crate::operation::delete_replication_configuration_template::builders::DeleteReplicationConfigurationTemplateOutputBuilder::default();
let _ = response;
output._set_request_id(
aws_http::request_id::RequestId::request_id(response).map(str::to_string),
);
output.build()
})
}