Struct aws_sdk_ec2::model::response_error::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ResponseError
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn code(self, input: LaunchTemplateErrorCode) -> Self
pub fn code(self, input: LaunchTemplateErrorCode) -> Self
The error code.
sourcepub fn set_code(self, input: Option<LaunchTemplateErrorCode>) -> Self
pub fn set_code(self, input: Option<LaunchTemplateErrorCode>) -> Self
The error code.
Examples found in repository?
src/xml_deser.rs (line 58076)
58058 58059 58060 58061 58062 58063 58064 58065 58066 58067 58068 58069 58070 58071 58072 58073 58074 58075 58076 58077 58078 58079 58080 58081 58082 58083 58084 58085 58086 58087 58088 58089 58090 58091 58092 58093 58094 58095 58096
pub fn deser_structure_crate_model_response_error(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ResponseError, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ResponseError::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#ResponseError$Code */ => {
let var_2830 =
Some(
Result::<crate::model::LaunchTemplateErrorCode, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::LaunchTemplateErrorCode::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_code(var_2830);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#ResponseError$Message */ => {
let var_2831 =
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_2831);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn set_message(self, input: Option<String>) -> Self
pub fn set_message(self, input: Option<String>) -> Self
The error message, if applicable.
Examples found in repository?
src/xml_deser.rs (line 58089)
58058 58059 58060 58061 58062 58063 58064 58065 58066 58067 58068 58069 58070 58071 58072 58073 58074 58075 58076 58077 58078 58079 58080 58081 58082 58083 58084 58085 58086 58087 58088 58089 58090 58091 58092 58093 58094 58095 58096
pub fn deser_structure_crate_model_response_error(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ResponseError, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ResponseError::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#ResponseError$Code */ => {
let var_2830 =
Some(
Result::<crate::model::LaunchTemplateErrorCode, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::LaunchTemplateErrorCode::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_code(var_2830);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#ResponseError$Message */ => {
let var_2831 =
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_2831);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> ResponseError
pub fn build(self) -> ResponseError
Consumes the builder and constructs a ResponseError
.
Examples found in repository?
src/xml_deser.rs (line 58095)
58058 58059 58060 58061 58062 58063 58064 58065 58066 58067 58068 58069 58070 58071 58072 58073 58074 58075 58076 58077 58078 58079 58080 58081 58082 58083 58084 58085 58086 58087 58088 58089 58090 58091 58092 58093 58094 58095 58096
pub fn deser_structure_crate_model_response_error(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ResponseError, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ResponseError::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#ResponseError$Code */ => {
let var_2830 =
Some(
Result::<crate::model::LaunchTemplateErrorCode, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::LaunchTemplateErrorCode::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_code(var_2830);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#ResponseError$Message */ => {
let var_2831 =
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_2831);
}
,
_ => {}
}
}
Ok(builder.build())
}