pub struct Builder { /* private fields */ }
Expand description
A builder for CacheParameterGroupAlreadyExistsFault
.
Implementations§
source§impl Builder
impl Builder
pub fn message(self, input: impl Into<String>) -> Self
sourcepub fn set_message(self, input: Option<String>) -> Self
pub fn set_message(self, input: Option<String>) -> Self
Examples found in repository?
src/xml_deser.rs (line 1341)
1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348
pub fn deser_structure_crate_error_cache_parameter_group_already_exists_fault_xml_err(
inp: &[u8],
mut builder: crate::error::cache_parameter_group_already_exists_fault::Builder,
) -> Result<
crate::error::cache_parameter_group_already_exists_fault::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("message") /* message com.amazonaws.elasticache#CacheParameterGroupAlreadyExistsFault$message */ => {
let var_37 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_37);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn build(self) -> CacheParameterGroupAlreadyExistsFault
pub fn build(self) -> CacheParameterGroupAlreadyExistsFault
Consumes the builder and constructs a CacheParameterGroupAlreadyExistsFault
.
Examples found in repository?
src/operation_deser.rs (line 1088)
1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168
pub fn parse_create_cache_parameter_group_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::CreateCacheParameterGroupOutput,
crate::error::CreateCacheParameterGroupError,
> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::CreateCacheParameterGroupError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::CreateCacheParameterGroupError::unhandled(
generic,
))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"CacheParameterGroupAlreadyExists" => crate::error::CreateCacheParameterGroupError { meta: generic, kind: crate::error::CreateCacheParameterGroupErrorKind::CacheParameterGroupAlreadyExistsFault({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::cache_parameter_group_already_exists_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_cache_parameter_group_already_exists_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::CreateCacheParameterGroupError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"CacheParameterGroupQuotaExceeded" => crate::error::CreateCacheParameterGroupError { meta: generic, kind: crate::error::CreateCacheParameterGroupErrorKind::CacheParameterGroupQuotaExceededFault({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::cache_parameter_group_quota_exceeded_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_cache_parameter_group_quota_exceeded_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::CreateCacheParameterGroupError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidCacheParameterGroupState" => crate::error::CreateCacheParameterGroupError { meta: generic, kind: crate::error::CreateCacheParameterGroupErrorKind::InvalidCacheParameterGroupStateFault({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_cache_parameter_group_state_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_cache_parameter_group_state_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::CreateCacheParameterGroupError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterCombination" => crate::error::CreateCacheParameterGroupError { meta: generic, kind: crate::error::CreateCacheParameterGroupErrorKind::InvalidParameterCombinationException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_parameter_combination_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_parameter_combination_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::CreateCacheParameterGroupError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterValue" => crate::error::CreateCacheParameterGroupError { meta: generic, kind: crate::error::CreateCacheParameterGroupErrorKind::InvalidParameterValueException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_parameter_value_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_parameter_value_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::CreateCacheParameterGroupError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"TagQuotaPerResourceExceeded" => crate::error::CreateCacheParameterGroupError { meta: generic, kind: crate::error::CreateCacheParameterGroupErrorKind::TagQuotaPerResourceExceeded({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::tag_quota_per_resource_exceeded::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_tag_quota_per_resource_exceeded_xml_err(response.body().as_ref(), output).map_err(crate::error::CreateCacheParameterGroupError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::CreateCacheParameterGroupError::generic(generic)
})
}