Struct aws_sdk_ec2::model::instance_export_details::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for InstanceExportDetails
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn instance_id(self, input: impl Into<String>) -> Self
pub fn instance_id(self, input: impl Into<String>) -> Self
The ID of the resource being exported.
sourcepub fn set_instance_id(self, input: Option<String>) -> Self
pub fn set_instance_id(self, input: Option<String>) -> Self
The ID of the resource being exported.
Examples found in repository?
src/xml_deser.rs (line 40692)
40675 40676 40677 40678 40679 40680 40681 40682 40683 40684 40685 40686 40687 40688 40689 40690 40691 40692 40693 40694 40695 40696 40697 40698 40699 40700 40701 40702 40703 40704 40705 40706 40707 40708 40709 40710 40711 40712 40713
pub fn deser_structure_crate_model_instance_export_details(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceExportDetails, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceExportDetails::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#InstanceExportDetails$InstanceId */ => {
let var_1739 =
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_instance_id(var_1739);
}
,
s if s.matches("targetEnvironment") /* TargetEnvironment com.amazonaws.ec2#InstanceExportDetails$TargetEnvironment */ => {
let var_1740 =
Some(
Result::<crate::model::ExportEnvironment, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ExportEnvironment::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_target_environment(var_1740);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn target_environment(self, input: ExportEnvironment) -> Self
pub fn target_environment(self, input: ExportEnvironment) -> Self
The target virtualization environment.
sourcepub fn set_target_environment(self, input: Option<ExportEnvironment>) -> Self
pub fn set_target_environment(self, input: Option<ExportEnvironment>) -> Self
The target virtualization environment.
Examples found in repository?
src/xml_deser.rs (line 40706)
40675 40676 40677 40678 40679 40680 40681 40682 40683 40684 40685 40686 40687 40688 40689 40690 40691 40692 40693 40694 40695 40696 40697 40698 40699 40700 40701 40702 40703 40704 40705 40706 40707 40708 40709 40710 40711 40712 40713
pub fn deser_structure_crate_model_instance_export_details(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceExportDetails, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceExportDetails::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#InstanceExportDetails$InstanceId */ => {
let var_1739 =
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_instance_id(var_1739);
}
,
s if s.matches("targetEnvironment") /* TargetEnvironment com.amazonaws.ec2#InstanceExportDetails$TargetEnvironment */ => {
let var_1740 =
Some(
Result::<crate::model::ExportEnvironment, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ExportEnvironment::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_target_environment(var_1740);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> InstanceExportDetails
pub fn build(self) -> InstanceExportDetails
Consumes the builder and constructs a InstanceExportDetails
.
Examples found in repository?
src/xml_deser.rs (line 40712)
40675 40676 40677 40678 40679 40680 40681 40682 40683 40684 40685 40686 40687 40688 40689 40690 40691 40692 40693 40694 40695 40696 40697 40698 40699 40700 40701 40702 40703 40704 40705 40706 40707 40708 40709 40710 40711 40712 40713
pub fn deser_structure_crate_model_instance_export_details(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceExportDetails, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceExportDetails::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#InstanceExportDetails$InstanceId */ => {
let var_1739 =
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_instance_id(var_1739);
}
,
s if s.matches("targetEnvironment") /* TargetEnvironment com.amazonaws.ec2#InstanceExportDetails$TargetEnvironment */ => {
let var_1740 =
Some(
Result::<crate::model::ExportEnvironment, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ExportEnvironment::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_target_environment(var_1740);
}
,
_ => {}
}
}
Ok(builder.build())
}