Struct aws_sdk_ec2::model::launch_template_enclave_options::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for LaunchTemplateEnclaveOptions.
Implementations§
source§impl Builder
impl Builder
sourcepub fn enabled(self, input: bool) -> Self
pub fn enabled(self, input: bool) -> Self
If this parameter is set to true, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.
sourcepub fn set_enabled(self, input: Option<bool>) -> Self
pub fn set_enabled(self, input: Option<bool>) -> Self
If this parameter is set to true, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.
Examples found in repository?
src/xml_deser.rs (line 53218)
53199 53200 53201 53202 53203 53204 53205 53206 53207 53208 53209 53210 53211 53212 53213 53214 53215 53216 53217 53218 53219 53220 53221 53222 53223 53224 53225
pub fn deser_structure_crate_model_launch_template_enclave_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateEnclaveOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateEnclaveOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("enabled") /* Enabled com.amazonaws.ec2#LaunchTemplateEnclaveOptions$Enabled */ => {
let var_2538 =
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_enabled(var_2538);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn build(self) -> LaunchTemplateEnclaveOptions
pub fn build(self) -> LaunchTemplateEnclaveOptions
Consumes the builder and constructs a LaunchTemplateEnclaveOptions.
Examples found in repository?
src/xml_deser.rs (line 53224)
53199 53200 53201 53202 53203 53204 53205 53206 53207 53208 53209 53210 53211 53212 53213 53214 53215 53216 53217 53218 53219 53220 53221 53222 53223 53224 53225
pub fn deser_structure_crate_model_launch_template_enclave_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateEnclaveOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateEnclaveOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("enabled") /* Enabled com.amazonaws.ec2#LaunchTemplateEnclaveOptions$Enabled */ => {
let var_2538 =
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_enabled(var_2538);
}
,
_ => {}
}
}
Ok(builder.build())
}