Struct aws_sdk_ec2::model::volume_attachment::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for VolumeAttachment
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn attach_time(self, input: DateTime) -> Self
pub fn attach_time(self, input: DateTime) -> Self
The time stamp when the attachment initiated.
sourcepub fn set_attach_time(self, input: Option<DateTime>) -> Self
pub fn set_attach_time(self, input: Option<DateTime>) -> Self
The time stamp when the attachment initiated.
Examples found in repository?
src/xml_deser.rs (line 41934)
41916 41917 41918 41919 41920 41921 41922 41923 41924 41925 41926 41927 41928 41929 41930 41931 41932 41933 41934 41935 41936 41937 41938 41939 41940 41941 41942 41943 41944 41945 41946 41947 41948 41949 41950 41951 41952 41953 41954 41955 41956 41957 41958 41959 41960 41961 41962 41963 41964 41965 41966 41967 41968 41969 41970 41971 41972 41973 41974 41975 41976 41977 41978 41979 41980 41981 41982 41983 41984 41985 41986 41987 41988 41989 41990 41991 41992 41993 41994 41995 41996 41997 41998 41999 42000 42001 42002 42003 42004 42005 42006 42007 42008 42009
pub fn deser_structure_crate_model_volume_attachment(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VolumeAttachment, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VolumeAttachment::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachTime") /* AttachTime com.amazonaws.ec2#VolumeAttachment$AttachTime */ => {
let var_1794 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_attach_time(var_1794);
}
,
s if s.matches("device") /* Device com.amazonaws.ec2#VolumeAttachment$Device */ => {
let var_1795 =
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_device(var_1795);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#VolumeAttachment$InstanceId */ => {
let var_1796 =
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_1796);
}
,
s if s.matches("status") /* State com.amazonaws.ec2#VolumeAttachment$State */ => {
let var_1797 =
Some(
Result::<crate::model::VolumeAttachmentState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::VolumeAttachmentState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1797);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#VolumeAttachment$VolumeId */ => {
let var_1798 =
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_volume_id(var_1798);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#VolumeAttachment$DeleteOnTermination */ => {
let var_1799 =
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_delete_on_termination(var_1799);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn set_device(self, input: Option<String>) -> Self
pub fn set_device(self, input: Option<String>) -> Self
The device name.
Examples found in repository?
src/xml_deser.rs (line 41947)
41916 41917 41918 41919 41920 41921 41922 41923 41924 41925 41926 41927 41928 41929 41930 41931 41932 41933 41934 41935 41936 41937 41938 41939 41940 41941 41942 41943 41944 41945 41946 41947 41948 41949 41950 41951 41952 41953 41954 41955 41956 41957 41958 41959 41960 41961 41962 41963 41964 41965 41966 41967 41968 41969 41970 41971 41972 41973 41974 41975 41976 41977 41978 41979 41980 41981 41982 41983 41984 41985 41986 41987 41988 41989 41990 41991 41992 41993 41994 41995 41996 41997 41998 41999 42000 42001 42002 42003 42004 42005 42006 42007 42008 42009
pub fn deser_structure_crate_model_volume_attachment(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VolumeAttachment, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VolumeAttachment::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachTime") /* AttachTime com.amazonaws.ec2#VolumeAttachment$AttachTime */ => {
let var_1794 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_attach_time(var_1794);
}
,
s if s.matches("device") /* Device com.amazonaws.ec2#VolumeAttachment$Device */ => {
let var_1795 =
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_device(var_1795);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#VolumeAttachment$InstanceId */ => {
let var_1796 =
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_1796);
}
,
s if s.matches("status") /* State com.amazonaws.ec2#VolumeAttachment$State */ => {
let var_1797 =
Some(
Result::<crate::model::VolumeAttachmentState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::VolumeAttachmentState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1797);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#VolumeAttachment$VolumeId */ => {
let var_1798 =
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_volume_id(var_1798);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#VolumeAttachment$DeleteOnTermination */ => {
let var_1799 =
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_delete_on_termination(var_1799);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn instance_id(self, input: impl Into<String>) -> Self
pub fn instance_id(self, input: impl Into<String>) -> Self
The ID of the instance.
sourcepub fn set_instance_id(self, input: Option<String>) -> Self
pub fn set_instance_id(self, input: Option<String>) -> Self
The ID of the instance.
Examples found in repository?
src/xml_deser.rs (line 41960)
41916 41917 41918 41919 41920 41921 41922 41923 41924 41925 41926 41927 41928 41929 41930 41931 41932 41933 41934 41935 41936 41937 41938 41939 41940 41941 41942 41943 41944 41945 41946 41947 41948 41949 41950 41951 41952 41953 41954 41955 41956 41957 41958 41959 41960 41961 41962 41963 41964 41965 41966 41967 41968 41969 41970 41971 41972 41973 41974 41975 41976 41977 41978 41979 41980 41981 41982 41983 41984 41985 41986 41987 41988 41989 41990 41991 41992 41993 41994 41995 41996 41997 41998 41999 42000 42001 42002 42003 42004 42005 42006 42007 42008 42009
pub fn deser_structure_crate_model_volume_attachment(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VolumeAttachment, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VolumeAttachment::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachTime") /* AttachTime com.amazonaws.ec2#VolumeAttachment$AttachTime */ => {
let var_1794 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_attach_time(var_1794);
}
,
s if s.matches("device") /* Device com.amazonaws.ec2#VolumeAttachment$Device */ => {
let var_1795 =
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_device(var_1795);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#VolumeAttachment$InstanceId */ => {
let var_1796 =
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_1796);
}
,
s if s.matches("status") /* State com.amazonaws.ec2#VolumeAttachment$State */ => {
let var_1797 =
Some(
Result::<crate::model::VolumeAttachmentState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::VolumeAttachmentState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1797);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#VolumeAttachment$VolumeId */ => {
let var_1798 =
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_volume_id(var_1798);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#VolumeAttachment$DeleteOnTermination */ => {
let var_1799 =
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_delete_on_termination(var_1799);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn state(self, input: VolumeAttachmentState) -> Self
pub fn state(self, input: VolumeAttachmentState) -> Self
The attachment state of the volume.
sourcepub fn set_state(self, input: Option<VolumeAttachmentState>) -> Self
pub fn set_state(self, input: Option<VolumeAttachmentState>) -> Self
The attachment state of the volume.
Examples found in repository?
src/xml_deser.rs (line 41974)
41916 41917 41918 41919 41920 41921 41922 41923 41924 41925 41926 41927 41928 41929 41930 41931 41932 41933 41934 41935 41936 41937 41938 41939 41940 41941 41942 41943 41944 41945 41946 41947 41948 41949 41950 41951 41952 41953 41954 41955 41956 41957 41958 41959 41960 41961 41962 41963 41964 41965 41966 41967 41968 41969 41970 41971 41972 41973 41974 41975 41976 41977 41978 41979 41980 41981 41982 41983 41984 41985 41986 41987 41988 41989 41990 41991 41992 41993 41994 41995 41996 41997 41998 41999 42000 42001 42002 42003 42004 42005 42006 42007 42008 42009
pub fn deser_structure_crate_model_volume_attachment(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VolumeAttachment, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VolumeAttachment::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachTime") /* AttachTime com.amazonaws.ec2#VolumeAttachment$AttachTime */ => {
let var_1794 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_attach_time(var_1794);
}
,
s if s.matches("device") /* Device com.amazonaws.ec2#VolumeAttachment$Device */ => {
let var_1795 =
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_device(var_1795);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#VolumeAttachment$InstanceId */ => {
let var_1796 =
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_1796);
}
,
s if s.matches("status") /* State com.amazonaws.ec2#VolumeAttachment$State */ => {
let var_1797 =
Some(
Result::<crate::model::VolumeAttachmentState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::VolumeAttachmentState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1797);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#VolumeAttachment$VolumeId */ => {
let var_1798 =
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_volume_id(var_1798);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#VolumeAttachment$DeleteOnTermination */ => {
let var_1799 =
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_delete_on_termination(var_1799);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn set_volume_id(self, input: Option<String>) -> Self
pub fn set_volume_id(self, input: Option<String>) -> Self
The ID of the volume.
Examples found in repository?
src/xml_deser.rs (line 41987)
41916 41917 41918 41919 41920 41921 41922 41923 41924 41925 41926 41927 41928 41929 41930 41931 41932 41933 41934 41935 41936 41937 41938 41939 41940 41941 41942 41943 41944 41945 41946 41947 41948 41949 41950 41951 41952 41953 41954 41955 41956 41957 41958 41959 41960 41961 41962 41963 41964 41965 41966 41967 41968 41969 41970 41971 41972 41973 41974 41975 41976 41977 41978 41979 41980 41981 41982 41983 41984 41985 41986 41987 41988 41989 41990 41991 41992 41993 41994 41995 41996 41997 41998 41999 42000 42001 42002 42003 42004 42005 42006 42007 42008 42009
pub fn deser_structure_crate_model_volume_attachment(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VolumeAttachment, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VolumeAttachment::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachTime") /* AttachTime com.amazonaws.ec2#VolumeAttachment$AttachTime */ => {
let var_1794 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_attach_time(var_1794);
}
,
s if s.matches("device") /* Device com.amazonaws.ec2#VolumeAttachment$Device */ => {
let var_1795 =
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_device(var_1795);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#VolumeAttachment$InstanceId */ => {
let var_1796 =
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_1796);
}
,
s if s.matches("status") /* State com.amazonaws.ec2#VolumeAttachment$State */ => {
let var_1797 =
Some(
Result::<crate::model::VolumeAttachmentState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::VolumeAttachmentState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1797);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#VolumeAttachment$VolumeId */ => {
let var_1798 =
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_volume_id(var_1798);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#VolumeAttachment$DeleteOnTermination */ => {
let var_1799 =
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_delete_on_termination(var_1799);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn delete_on_termination(self, input: bool) -> Self
pub fn delete_on_termination(self, input: bool) -> Self
Indicates whether the EBS volume is deleted on instance termination.
sourcepub fn set_delete_on_termination(self, input: Option<bool>) -> Self
pub fn set_delete_on_termination(self, input: Option<bool>) -> Self
Indicates whether the EBS volume is deleted on instance termination.
Examples found in repository?
src/xml_deser.rs (line 42002)
41916 41917 41918 41919 41920 41921 41922 41923 41924 41925 41926 41927 41928 41929 41930 41931 41932 41933 41934 41935 41936 41937 41938 41939 41940 41941 41942 41943 41944 41945 41946 41947 41948 41949 41950 41951 41952 41953 41954 41955 41956 41957 41958 41959 41960 41961 41962 41963 41964 41965 41966 41967 41968 41969 41970 41971 41972 41973 41974 41975 41976 41977 41978 41979 41980 41981 41982 41983 41984 41985 41986 41987 41988 41989 41990 41991 41992 41993 41994 41995 41996 41997 41998 41999 42000 42001 42002 42003 42004 42005 42006 42007 42008 42009
pub fn deser_structure_crate_model_volume_attachment(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VolumeAttachment, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VolumeAttachment::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachTime") /* AttachTime com.amazonaws.ec2#VolumeAttachment$AttachTime */ => {
let var_1794 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_attach_time(var_1794);
}
,
s if s.matches("device") /* Device com.amazonaws.ec2#VolumeAttachment$Device */ => {
let var_1795 =
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_device(var_1795);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#VolumeAttachment$InstanceId */ => {
let var_1796 =
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_1796);
}
,
s if s.matches("status") /* State com.amazonaws.ec2#VolumeAttachment$State */ => {
let var_1797 =
Some(
Result::<crate::model::VolumeAttachmentState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::VolumeAttachmentState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1797);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#VolumeAttachment$VolumeId */ => {
let var_1798 =
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_volume_id(var_1798);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#VolumeAttachment$DeleteOnTermination */ => {
let var_1799 =
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_delete_on_termination(var_1799);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> VolumeAttachment
pub fn build(self) -> VolumeAttachment
Consumes the builder and constructs a VolumeAttachment
.
Examples found in repository?
src/xml_deser.rs (line 42008)
41916 41917 41918 41919 41920 41921 41922 41923 41924 41925 41926 41927 41928 41929 41930 41931 41932 41933 41934 41935 41936 41937 41938 41939 41940 41941 41942 41943 41944 41945 41946 41947 41948 41949 41950 41951 41952 41953 41954 41955 41956 41957 41958 41959 41960 41961 41962 41963 41964 41965 41966 41967 41968 41969 41970 41971 41972 41973 41974 41975 41976 41977 41978 41979 41980 41981 41982 41983 41984 41985 41986 41987 41988 41989 41990 41991 41992 41993 41994 41995 41996 41997 41998 41999 42000 42001 42002 42003 42004 42005 42006 42007 42008 42009
pub fn deser_structure_crate_model_volume_attachment(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VolumeAttachment, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VolumeAttachment::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachTime") /* AttachTime com.amazonaws.ec2#VolumeAttachment$AttachTime */ => {
let var_1794 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_attach_time(var_1794);
}
,
s if s.matches("device") /* Device com.amazonaws.ec2#VolumeAttachment$Device */ => {
let var_1795 =
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_device(var_1795);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#VolumeAttachment$InstanceId */ => {
let var_1796 =
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_1796);
}
,
s if s.matches("status") /* State com.amazonaws.ec2#VolumeAttachment$State */ => {
let var_1797 =
Some(
Result::<crate::model::VolumeAttachmentState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::VolumeAttachmentState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1797);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#VolumeAttachment$VolumeId */ => {
let var_1798 =
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_volume_id(var_1798);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#VolumeAttachment$DeleteOnTermination */ => {
let var_1799 =
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_delete_on_termination(var_1799);
}
,
_ => {}
}
}
Ok(builder.build())
}