Struct aws_sdk_ec2::model::snapshot_recycle_bin_info::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for SnapshotRecycleBinInfo
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn snapshot_id(self, input: impl Into<String>) -> Self
pub fn snapshot_id(self, input: impl Into<String>) -> Self
The ID of the snapshot.
sourcepub fn set_snapshot_id(self, input: Option<String>) -> Self
pub fn set_snapshot_id(self, input: Option<String>) -> Self
The ID of the snapshot.
Examples found in repository?
src/xml_deser.rs (line 54656)
54639 54640 54641 54642 54643 54644 54645 54646 54647 54648 54649 54650 54651 54652 54653 54654 54655 54656 54657 54658 54659 54660 54661 54662 54663 54664 54665 54666 54667 54668 54669 54670 54671 54672 54673 54674 54675 54676 54677 54678 54679 54680 54681 54682 54683 54684 54685 54686 54687 54688 54689 54690 54691 54692 54693 54694 54695 54696 54697 54698 54699 54700 54701 54702 54703 54704 54705 54706 54707 54708 54709 54710 54711 54712 54713 54714 54715 54716 54717
pub fn deser_structure_crate_model_snapshot_recycle_bin_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SnapshotRecycleBinInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::SnapshotRecycleBinInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#SnapshotRecycleBinInfo$SnapshotId */ => {
let var_2629 =
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_snapshot_id(var_2629);
}
,
s if s.matches("recycleBinEnterTime") /* RecycleBinEnterTime com.amazonaws.ec2#SnapshotRecycleBinInfo$RecycleBinEnterTime */ => {
let var_2630 =
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#MillisecondDateTime`)"))
?
)
;
builder = builder.set_recycle_bin_enter_time(var_2630);
}
,
s if s.matches("recycleBinExitTime") /* RecycleBinExitTime com.amazonaws.ec2#SnapshotRecycleBinInfo$RecycleBinExitTime */ => {
let var_2631 =
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#MillisecondDateTime`)"))
?
)
;
builder = builder.set_recycle_bin_exit_time(var_2631);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#SnapshotRecycleBinInfo$Description */ => {
let var_2632 =
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_description(var_2632);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#SnapshotRecycleBinInfo$VolumeId */ => {
let var_2633 =
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_2633);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn recycle_bin_enter_time(self, input: DateTime) -> Self
pub fn recycle_bin_enter_time(self, input: DateTime) -> Self
The date and time when the snaphsot entered the Recycle Bin.
sourcepub fn set_recycle_bin_enter_time(self, input: Option<DateTime>) -> Self
pub fn set_recycle_bin_enter_time(self, input: Option<DateTime>) -> Self
The date and time when the snaphsot entered the Recycle Bin.
Examples found in repository?
src/xml_deser.rs (line 54670)
54639 54640 54641 54642 54643 54644 54645 54646 54647 54648 54649 54650 54651 54652 54653 54654 54655 54656 54657 54658 54659 54660 54661 54662 54663 54664 54665 54666 54667 54668 54669 54670 54671 54672 54673 54674 54675 54676 54677 54678 54679 54680 54681 54682 54683 54684 54685 54686 54687 54688 54689 54690 54691 54692 54693 54694 54695 54696 54697 54698 54699 54700 54701 54702 54703 54704 54705 54706 54707 54708 54709 54710 54711 54712 54713 54714 54715 54716 54717
pub fn deser_structure_crate_model_snapshot_recycle_bin_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SnapshotRecycleBinInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::SnapshotRecycleBinInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#SnapshotRecycleBinInfo$SnapshotId */ => {
let var_2629 =
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_snapshot_id(var_2629);
}
,
s if s.matches("recycleBinEnterTime") /* RecycleBinEnterTime com.amazonaws.ec2#SnapshotRecycleBinInfo$RecycleBinEnterTime */ => {
let var_2630 =
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#MillisecondDateTime`)"))
?
)
;
builder = builder.set_recycle_bin_enter_time(var_2630);
}
,
s if s.matches("recycleBinExitTime") /* RecycleBinExitTime com.amazonaws.ec2#SnapshotRecycleBinInfo$RecycleBinExitTime */ => {
let var_2631 =
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#MillisecondDateTime`)"))
?
)
;
builder = builder.set_recycle_bin_exit_time(var_2631);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#SnapshotRecycleBinInfo$Description */ => {
let var_2632 =
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_description(var_2632);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#SnapshotRecycleBinInfo$VolumeId */ => {
let var_2633 =
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_2633);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn recycle_bin_exit_time(self, input: DateTime) -> Self
pub fn recycle_bin_exit_time(self, input: DateTime) -> Self
The date and time when the snapshot is to be permanently deleted from the Recycle Bin.
sourcepub fn set_recycle_bin_exit_time(self, input: Option<DateTime>) -> Self
pub fn set_recycle_bin_exit_time(self, input: Option<DateTime>) -> Self
The date and time when the snapshot is to be permanently deleted from the Recycle Bin.
Examples found in repository?
src/xml_deser.rs (line 54684)
54639 54640 54641 54642 54643 54644 54645 54646 54647 54648 54649 54650 54651 54652 54653 54654 54655 54656 54657 54658 54659 54660 54661 54662 54663 54664 54665 54666 54667 54668 54669 54670 54671 54672 54673 54674 54675 54676 54677 54678 54679 54680 54681 54682 54683 54684 54685 54686 54687 54688 54689 54690 54691 54692 54693 54694 54695 54696 54697 54698 54699 54700 54701 54702 54703 54704 54705 54706 54707 54708 54709 54710 54711 54712 54713 54714 54715 54716 54717
pub fn deser_structure_crate_model_snapshot_recycle_bin_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SnapshotRecycleBinInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::SnapshotRecycleBinInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#SnapshotRecycleBinInfo$SnapshotId */ => {
let var_2629 =
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_snapshot_id(var_2629);
}
,
s if s.matches("recycleBinEnterTime") /* RecycleBinEnterTime com.amazonaws.ec2#SnapshotRecycleBinInfo$RecycleBinEnterTime */ => {
let var_2630 =
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#MillisecondDateTime`)"))
?
)
;
builder = builder.set_recycle_bin_enter_time(var_2630);
}
,
s if s.matches("recycleBinExitTime") /* RecycleBinExitTime com.amazonaws.ec2#SnapshotRecycleBinInfo$RecycleBinExitTime */ => {
let var_2631 =
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#MillisecondDateTime`)"))
?
)
;
builder = builder.set_recycle_bin_exit_time(var_2631);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#SnapshotRecycleBinInfo$Description */ => {
let var_2632 =
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_description(var_2632);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#SnapshotRecycleBinInfo$VolumeId */ => {
let var_2633 =
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_2633);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn description(self, input: impl Into<String>) -> Self
pub fn description(self, input: impl Into<String>) -> Self
The description for the snapshot.
sourcepub fn set_description(self, input: Option<String>) -> Self
pub fn set_description(self, input: Option<String>) -> Self
The description for the snapshot.
Examples found in repository?
src/xml_deser.rs (line 54697)
54639 54640 54641 54642 54643 54644 54645 54646 54647 54648 54649 54650 54651 54652 54653 54654 54655 54656 54657 54658 54659 54660 54661 54662 54663 54664 54665 54666 54667 54668 54669 54670 54671 54672 54673 54674 54675 54676 54677 54678 54679 54680 54681 54682 54683 54684 54685 54686 54687 54688 54689 54690 54691 54692 54693 54694 54695 54696 54697 54698 54699 54700 54701 54702 54703 54704 54705 54706 54707 54708 54709 54710 54711 54712 54713 54714 54715 54716 54717
pub fn deser_structure_crate_model_snapshot_recycle_bin_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SnapshotRecycleBinInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::SnapshotRecycleBinInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#SnapshotRecycleBinInfo$SnapshotId */ => {
let var_2629 =
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_snapshot_id(var_2629);
}
,
s if s.matches("recycleBinEnterTime") /* RecycleBinEnterTime com.amazonaws.ec2#SnapshotRecycleBinInfo$RecycleBinEnterTime */ => {
let var_2630 =
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#MillisecondDateTime`)"))
?
)
;
builder = builder.set_recycle_bin_enter_time(var_2630);
}
,
s if s.matches("recycleBinExitTime") /* RecycleBinExitTime com.amazonaws.ec2#SnapshotRecycleBinInfo$RecycleBinExitTime */ => {
let var_2631 =
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#MillisecondDateTime`)"))
?
)
;
builder = builder.set_recycle_bin_exit_time(var_2631);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#SnapshotRecycleBinInfo$Description */ => {
let var_2632 =
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_description(var_2632);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#SnapshotRecycleBinInfo$VolumeId */ => {
let var_2633 =
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_2633);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn volume_id(self, input: impl Into<String>) -> Self
pub fn volume_id(self, input: impl Into<String>) -> Self
The ID of the volume from which the snapshot was created.
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 from which the snapshot was created.
Examples found in repository?
src/xml_deser.rs (line 54710)
54639 54640 54641 54642 54643 54644 54645 54646 54647 54648 54649 54650 54651 54652 54653 54654 54655 54656 54657 54658 54659 54660 54661 54662 54663 54664 54665 54666 54667 54668 54669 54670 54671 54672 54673 54674 54675 54676 54677 54678 54679 54680 54681 54682 54683 54684 54685 54686 54687 54688 54689 54690 54691 54692 54693 54694 54695 54696 54697 54698 54699 54700 54701 54702 54703 54704 54705 54706 54707 54708 54709 54710 54711 54712 54713 54714 54715 54716 54717
pub fn deser_structure_crate_model_snapshot_recycle_bin_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SnapshotRecycleBinInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::SnapshotRecycleBinInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#SnapshotRecycleBinInfo$SnapshotId */ => {
let var_2629 =
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_snapshot_id(var_2629);
}
,
s if s.matches("recycleBinEnterTime") /* RecycleBinEnterTime com.amazonaws.ec2#SnapshotRecycleBinInfo$RecycleBinEnterTime */ => {
let var_2630 =
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#MillisecondDateTime`)"))
?
)
;
builder = builder.set_recycle_bin_enter_time(var_2630);
}
,
s if s.matches("recycleBinExitTime") /* RecycleBinExitTime com.amazonaws.ec2#SnapshotRecycleBinInfo$RecycleBinExitTime */ => {
let var_2631 =
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#MillisecondDateTime`)"))
?
)
;
builder = builder.set_recycle_bin_exit_time(var_2631);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#SnapshotRecycleBinInfo$Description */ => {
let var_2632 =
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_description(var_2632);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#SnapshotRecycleBinInfo$VolumeId */ => {
let var_2633 =
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_2633);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> SnapshotRecycleBinInfo
pub fn build(self) -> SnapshotRecycleBinInfo
Consumes the builder and constructs a SnapshotRecycleBinInfo
.
Examples found in repository?
src/xml_deser.rs (line 54716)
54639 54640 54641 54642 54643 54644 54645 54646 54647 54648 54649 54650 54651 54652 54653 54654 54655 54656 54657 54658 54659 54660 54661 54662 54663 54664 54665 54666 54667 54668 54669 54670 54671 54672 54673 54674 54675 54676 54677 54678 54679 54680 54681 54682 54683 54684 54685 54686 54687 54688 54689 54690 54691 54692 54693 54694 54695 54696 54697 54698 54699 54700 54701 54702 54703 54704 54705 54706 54707 54708 54709 54710 54711 54712 54713 54714 54715 54716 54717
pub fn deser_structure_crate_model_snapshot_recycle_bin_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SnapshotRecycleBinInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::SnapshotRecycleBinInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#SnapshotRecycleBinInfo$SnapshotId */ => {
let var_2629 =
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_snapshot_id(var_2629);
}
,
s if s.matches("recycleBinEnterTime") /* RecycleBinEnterTime com.amazonaws.ec2#SnapshotRecycleBinInfo$RecycleBinEnterTime */ => {
let var_2630 =
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#MillisecondDateTime`)"))
?
)
;
builder = builder.set_recycle_bin_enter_time(var_2630);
}
,
s if s.matches("recycleBinExitTime") /* RecycleBinExitTime com.amazonaws.ec2#SnapshotRecycleBinInfo$RecycleBinExitTime */ => {
let var_2631 =
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#MillisecondDateTime`)"))
?
)
;
builder = builder.set_recycle_bin_exit_time(var_2631);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#SnapshotRecycleBinInfo$Description */ => {
let var_2632 =
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_description(var_2632);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#SnapshotRecycleBinInfo$VolumeId */ => {
let var_2633 =
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_2633);
}
,
_ => {}
}
}
Ok(builder.build())
}