Struct aws_sdk_ec2::model::ebs_instance_block_device::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for EbsInstanceBlockDevice
.
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 59386)
59368 59369 59370 59371 59372 59373 59374 59375 59376 59377 59378 59379 59380 59381 59382 59383 59384 59385 59386 59387 59388 59389 59390 59391 59392 59393 59394 59395 59396 59397 59398 59399 59400 59401 59402 59403 59404 59405 59406 59407 59408 59409 59410 59411 59412 59413 59414 59415 59416 59417 59418 59419 59420 59421 59422 59423 59424 59425 59426 59427 59428 59429 59430 59431 59432 59433 59434 59435
pub fn deser_structure_crate_model_ebs_instance_block_device(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::EbsInstanceBlockDevice, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::EbsInstanceBlockDevice::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachTime") /* AttachTime com.amazonaws.ec2#EbsInstanceBlockDevice$AttachTime */ => {
let var_2894 =
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_2894);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#EbsInstanceBlockDevice$DeleteOnTermination */ => {
let var_2895 =
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_2895);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#EbsInstanceBlockDevice$Status */ => {
let var_2896 =
Some(
Result::<crate::model::AttachmentStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::AttachmentStatus::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_2896);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#EbsInstanceBlockDevice$VolumeId */ => {
let var_2897 =
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_2897);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn delete_on_termination(self, input: bool) -> Self
pub fn delete_on_termination(self, input: bool) -> Self
Indicates whether the 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 volume is deleted on instance termination.
Examples found in repository?
src/xml_deser.rs (line 59401)
59368 59369 59370 59371 59372 59373 59374 59375 59376 59377 59378 59379 59380 59381 59382 59383 59384 59385 59386 59387 59388 59389 59390 59391 59392 59393 59394 59395 59396 59397 59398 59399 59400 59401 59402 59403 59404 59405 59406 59407 59408 59409 59410 59411 59412 59413 59414 59415 59416 59417 59418 59419 59420 59421 59422 59423 59424 59425 59426 59427 59428 59429 59430 59431 59432 59433 59434 59435
pub fn deser_structure_crate_model_ebs_instance_block_device(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::EbsInstanceBlockDevice, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::EbsInstanceBlockDevice::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachTime") /* AttachTime com.amazonaws.ec2#EbsInstanceBlockDevice$AttachTime */ => {
let var_2894 =
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_2894);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#EbsInstanceBlockDevice$DeleteOnTermination */ => {
let var_2895 =
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_2895);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#EbsInstanceBlockDevice$Status */ => {
let var_2896 =
Some(
Result::<crate::model::AttachmentStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::AttachmentStatus::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_2896);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#EbsInstanceBlockDevice$VolumeId */ => {
let var_2897 =
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_2897);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn status(self, input: AttachmentStatus) -> Self
pub fn status(self, input: AttachmentStatus) -> Self
The attachment state.
sourcepub fn set_status(self, input: Option<AttachmentStatus>) -> Self
pub fn set_status(self, input: Option<AttachmentStatus>) -> Self
The attachment state.
Examples found in repository?
src/xml_deser.rs (line 59415)
59368 59369 59370 59371 59372 59373 59374 59375 59376 59377 59378 59379 59380 59381 59382 59383 59384 59385 59386 59387 59388 59389 59390 59391 59392 59393 59394 59395 59396 59397 59398 59399 59400 59401 59402 59403 59404 59405 59406 59407 59408 59409 59410 59411 59412 59413 59414 59415 59416 59417 59418 59419 59420 59421 59422 59423 59424 59425 59426 59427 59428 59429 59430 59431 59432 59433 59434 59435
pub fn deser_structure_crate_model_ebs_instance_block_device(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::EbsInstanceBlockDevice, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::EbsInstanceBlockDevice::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachTime") /* AttachTime com.amazonaws.ec2#EbsInstanceBlockDevice$AttachTime */ => {
let var_2894 =
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_2894);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#EbsInstanceBlockDevice$DeleteOnTermination */ => {
let var_2895 =
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_2895);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#EbsInstanceBlockDevice$Status */ => {
let var_2896 =
Some(
Result::<crate::model::AttachmentStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::AttachmentStatus::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_2896);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#EbsInstanceBlockDevice$VolumeId */ => {
let var_2897 =
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_2897);
}
,
_ => {}
}
}
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 EBS volume.
Examples found in repository?
src/xml_deser.rs (line 59428)
59368 59369 59370 59371 59372 59373 59374 59375 59376 59377 59378 59379 59380 59381 59382 59383 59384 59385 59386 59387 59388 59389 59390 59391 59392 59393 59394 59395 59396 59397 59398 59399 59400 59401 59402 59403 59404 59405 59406 59407 59408 59409 59410 59411 59412 59413 59414 59415 59416 59417 59418 59419 59420 59421 59422 59423 59424 59425 59426 59427 59428 59429 59430 59431 59432 59433 59434 59435
pub fn deser_structure_crate_model_ebs_instance_block_device(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::EbsInstanceBlockDevice, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::EbsInstanceBlockDevice::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachTime") /* AttachTime com.amazonaws.ec2#EbsInstanceBlockDevice$AttachTime */ => {
let var_2894 =
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_2894);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#EbsInstanceBlockDevice$DeleteOnTermination */ => {
let var_2895 =
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_2895);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#EbsInstanceBlockDevice$Status */ => {
let var_2896 =
Some(
Result::<crate::model::AttachmentStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::AttachmentStatus::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_2896);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#EbsInstanceBlockDevice$VolumeId */ => {
let var_2897 =
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_2897);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> EbsInstanceBlockDevice
pub fn build(self) -> EbsInstanceBlockDevice
Consumes the builder and constructs a EbsInstanceBlockDevice
.
Examples found in repository?
src/xml_deser.rs (line 59434)
59368 59369 59370 59371 59372 59373 59374 59375 59376 59377 59378 59379 59380 59381 59382 59383 59384 59385 59386 59387 59388 59389 59390 59391 59392 59393 59394 59395 59396 59397 59398 59399 59400 59401 59402 59403 59404 59405 59406 59407 59408 59409 59410 59411 59412 59413 59414 59415 59416 59417 59418 59419 59420 59421 59422 59423 59424 59425 59426 59427 59428 59429 59430 59431 59432 59433 59434 59435
pub fn deser_structure_crate_model_ebs_instance_block_device(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::EbsInstanceBlockDevice, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::EbsInstanceBlockDevice::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachTime") /* AttachTime com.amazonaws.ec2#EbsInstanceBlockDevice$AttachTime */ => {
let var_2894 =
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_2894);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#EbsInstanceBlockDevice$DeleteOnTermination */ => {
let var_2895 =
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_2895);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#EbsInstanceBlockDevice$Status */ => {
let var_2896 =
Some(
Result::<crate::model::AttachmentStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::AttachmentStatus::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_2896);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#EbsInstanceBlockDevice$VolumeId */ => {
let var_2897 =
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_2897);
}
,
_ => {}
}
}
Ok(builder.build())
}