pub struct Builder { /* private fields */ }
Expand description
A builder for LaunchTemplateHibernationOptions
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn configured(self, input: bool) -> Self
pub fn configured(self, input: bool) -> Self
If this parameter is set to true
, the instance is enabled for hibernation; otherwise, it is not enabled for hibernation.
sourcepub fn set_configured(self, input: Option<bool>) -> Self
pub fn set_configured(self, input: Option<bool>) -> Self
If this parameter is set to true
, the instance is enabled for hibernation; otherwise, it is not enabled for hibernation.
Examples found in repository?
src/xml_deser.rs (line 53089)
53069 53070 53071 53072 53073 53074 53075 53076 53077 53078 53079 53080 53081 53082 53083 53084 53085 53086 53087 53088 53089 53090 53091 53092 53093 53094 53095 53096
pub fn deser_structure_crate_model_launch_template_hibernation_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateHibernationOptions, aws_smithy_xml::decode::XmlDecodeError>
{
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateHibernationOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("configured") /* Configured com.amazonaws.ec2#LaunchTemplateHibernationOptions$Configured */ => {
let var_2531 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_configured(var_2531);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> LaunchTemplateHibernationOptions
pub fn build(self) -> LaunchTemplateHibernationOptions
Consumes the builder and constructs a LaunchTemplateHibernationOptions
.
Examples found in repository?
src/xml_deser.rs (line 53095)
53069 53070 53071 53072 53073 53074 53075 53076 53077 53078 53079 53080 53081 53082 53083 53084 53085 53086 53087 53088 53089 53090 53091 53092 53093 53094 53095 53096
pub fn deser_structure_crate_model_launch_template_hibernation_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateHibernationOptions, aws_smithy_xml::decode::XmlDecodeError>
{
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateHibernationOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("configured") /* Configured com.amazonaws.ec2#LaunchTemplateHibernationOptions$Configured */ => {
let var_2531 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_configured(var_2531);
}
,
_ => {}
}
}
Ok(builder.build())
}