Struct aws_sdk_ec2::model::instance_storage_info::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for InstanceStorageInfo
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn total_size_in_gb(self, input: i64) -> Self
pub fn total_size_in_gb(self, input: i64) -> Self
The total size of the disks, in GB.
sourcepub fn set_total_size_in_gb(self, input: Option<i64>) -> Self
pub fn set_total_size_in_gb(self, input: Option<i64>) -> Self
The total size of the disks, in GB.
Examples found in repository?
src/xml_deser.rs (line 59769)
59750 59751 59752 59753 59754 59755 59756 59757 59758 59759 59760 59761 59762 59763 59764 59765 59766 59767 59768 59769 59770 59771 59772 59773 59774 59775 59776 59777 59778 59779 59780 59781 59782 59783 59784 59785 59786 59787 59788 59789 59790 59791 59792 59793 59794 59795 59796 59797 59798 59799 59800 59801 59802 59803 59804 59805 59806 59807 59808 59809 59810 59811 59812 59813 59814
pub fn deser_structure_crate_model_instance_storage_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceStorageInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceStorageInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("totalSizeInGB") /* TotalSizeInGB com.amazonaws.ec2#InstanceStorageInfo$TotalSizeInGB */ => {
let var_2910 =
Some(
{
<i64 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 (long: `com.amazonaws.ec2#DiskSize`)"))
}
?
)
;
builder = builder.set_total_size_in_gb(var_2910);
}
,
s if s.matches("disks") /* Disks com.amazonaws.ec2#InstanceStorageInfo$Disks */ => {
let var_2911 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_disk_info_list(&mut tag)
?
)
;
builder = builder.set_disks(var_2911);
}
,
s if s.matches("nvmeSupport") /* NvmeSupport com.amazonaws.ec2#InstanceStorageInfo$NvmeSupport */ => {
let var_2912 =
Some(
Result::<crate::model::EphemeralNvmeSupport, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EphemeralNvmeSupport::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_nvme_support(var_2912);
}
,
s if s.matches("encryptionSupport") /* EncryptionSupport com.amazonaws.ec2#InstanceStorageInfo$EncryptionSupport */ => {
let var_2913 =
Some(
Result::<crate::model::InstanceStorageEncryptionSupport, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceStorageEncryptionSupport::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_encryption_support(var_2913);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn disks(self, input: DiskInfo) -> Self
pub fn disks(self, input: DiskInfo) -> Self
Appends an item to disks
.
To override the contents of this collection use set_disks
.
Describes the disks that are available for the instance type.
sourcepub fn set_disks(self, input: Option<Vec<DiskInfo>>) -> Self
pub fn set_disks(self, input: Option<Vec<DiskInfo>>) -> Self
Describes the disks that are available for the instance type.
Examples found in repository?
src/xml_deser.rs (line 59779)
59750 59751 59752 59753 59754 59755 59756 59757 59758 59759 59760 59761 59762 59763 59764 59765 59766 59767 59768 59769 59770 59771 59772 59773 59774 59775 59776 59777 59778 59779 59780 59781 59782 59783 59784 59785 59786 59787 59788 59789 59790 59791 59792 59793 59794 59795 59796 59797 59798 59799 59800 59801 59802 59803 59804 59805 59806 59807 59808 59809 59810 59811 59812 59813 59814
pub fn deser_structure_crate_model_instance_storage_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceStorageInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceStorageInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("totalSizeInGB") /* TotalSizeInGB com.amazonaws.ec2#InstanceStorageInfo$TotalSizeInGB */ => {
let var_2910 =
Some(
{
<i64 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 (long: `com.amazonaws.ec2#DiskSize`)"))
}
?
)
;
builder = builder.set_total_size_in_gb(var_2910);
}
,
s if s.matches("disks") /* Disks com.amazonaws.ec2#InstanceStorageInfo$Disks */ => {
let var_2911 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_disk_info_list(&mut tag)
?
)
;
builder = builder.set_disks(var_2911);
}
,
s if s.matches("nvmeSupport") /* NvmeSupport com.amazonaws.ec2#InstanceStorageInfo$NvmeSupport */ => {
let var_2912 =
Some(
Result::<crate::model::EphemeralNvmeSupport, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EphemeralNvmeSupport::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_nvme_support(var_2912);
}
,
s if s.matches("encryptionSupport") /* EncryptionSupport com.amazonaws.ec2#InstanceStorageInfo$EncryptionSupport */ => {
let var_2913 =
Some(
Result::<crate::model::InstanceStorageEncryptionSupport, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceStorageEncryptionSupport::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_encryption_support(var_2913);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn nvme_support(self, input: EphemeralNvmeSupport) -> Self
pub fn nvme_support(self, input: EphemeralNvmeSupport) -> Self
Indicates whether non-volatile memory express (NVMe) is supported.
sourcepub fn set_nvme_support(self, input: Option<EphemeralNvmeSupport>) -> Self
pub fn set_nvme_support(self, input: Option<EphemeralNvmeSupport>) -> Self
Indicates whether non-volatile memory express (NVMe) is supported.
Examples found in repository?
src/xml_deser.rs (line 59793)
59750 59751 59752 59753 59754 59755 59756 59757 59758 59759 59760 59761 59762 59763 59764 59765 59766 59767 59768 59769 59770 59771 59772 59773 59774 59775 59776 59777 59778 59779 59780 59781 59782 59783 59784 59785 59786 59787 59788 59789 59790 59791 59792 59793 59794 59795 59796 59797 59798 59799 59800 59801 59802 59803 59804 59805 59806 59807 59808 59809 59810 59811 59812 59813 59814
pub fn deser_structure_crate_model_instance_storage_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceStorageInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceStorageInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("totalSizeInGB") /* TotalSizeInGB com.amazonaws.ec2#InstanceStorageInfo$TotalSizeInGB */ => {
let var_2910 =
Some(
{
<i64 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 (long: `com.amazonaws.ec2#DiskSize`)"))
}
?
)
;
builder = builder.set_total_size_in_gb(var_2910);
}
,
s if s.matches("disks") /* Disks com.amazonaws.ec2#InstanceStorageInfo$Disks */ => {
let var_2911 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_disk_info_list(&mut tag)
?
)
;
builder = builder.set_disks(var_2911);
}
,
s if s.matches("nvmeSupport") /* NvmeSupport com.amazonaws.ec2#InstanceStorageInfo$NvmeSupport */ => {
let var_2912 =
Some(
Result::<crate::model::EphemeralNvmeSupport, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EphemeralNvmeSupport::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_nvme_support(var_2912);
}
,
s if s.matches("encryptionSupport") /* EncryptionSupport com.amazonaws.ec2#InstanceStorageInfo$EncryptionSupport */ => {
let var_2913 =
Some(
Result::<crate::model::InstanceStorageEncryptionSupport, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceStorageEncryptionSupport::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_encryption_support(var_2913);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn encryption_support(self, input: InstanceStorageEncryptionSupport) -> Self
pub fn encryption_support(self, input: InstanceStorageEncryptionSupport) -> Self
Indicates whether data is encrypted at rest.
sourcepub fn set_encryption_support(
self,
input: Option<InstanceStorageEncryptionSupport>
) -> Self
pub fn set_encryption_support(
self,
input: Option<InstanceStorageEncryptionSupport>
) -> Self
Indicates whether data is encrypted at rest.
Examples found in repository?
src/xml_deser.rs (line 59807)
59750 59751 59752 59753 59754 59755 59756 59757 59758 59759 59760 59761 59762 59763 59764 59765 59766 59767 59768 59769 59770 59771 59772 59773 59774 59775 59776 59777 59778 59779 59780 59781 59782 59783 59784 59785 59786 59787 59788 59789 59790 59791 59792 59793 59794 59795 59796 59797 59798 59799 59800 59801 59802 59803 59804 59805 59806 59807 59808 59809 59810 59811 59812 59813 59814
pub fn deser_structure_crate_model_instance_storage_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceStorageInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceStorageInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("totalSizeInGB") /* TotalSizeInGB com.amazonaws.ec2#InstanceStorageInfo$TotalSizeInGB */ => {
let var_2910 =
Some(
{
<i64 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 (long: `com.amazonaws.ec2#DiskSize`)"))
}
?
)
;
builder = builder.set_total_size_in_gb(var_2910);
}
,
s if s.matches("disks") /* Disks com.amazonaws.ec2#InstanceStorageInfo$Disks */ => {
let var_2911 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_disk_info_list(&mut tag)
?
)
;
builder = builder.set_disks(var_2911);
}
,
s if s.matches("nvmeSupport") /* NvmeSupport com.amazonaws.ec2#InstanceStorageInfo$NvmeSupport */ => {
let var_2912 =
Some(
Result::<crate::model::EphemeralNvmeSupport, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EphemeralNvmeSupport::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_nvme_support(var_2912);
}
,
s if s.matches("encryptionSupport") /* EncryptionSupport com.amazonaws.ec2#InstanceStorageInfo$EncryptionSupport */ => {
let var_2913 =
Some(
Result::<crate::model::InstanceStorageEncryptionSupport, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceStorageEncryptionSupport::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_encryption_support(var_2913);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> InstanceStorageInfo
pub fn build(self) -> InstanceStorageInfo
Consumes the builder and constructs a InstanceStorageInfo
.
Examples found in repository?
src/xml_deser.rs (line 59813)
59750 59751 59752 59753 59754 59755 59756 59757 59758 59759 59760 59761 59762 59763 59764 59765 59766 59767 59768 59769 59770 59771 59772 59773 59774 59775 59776 59777 59778 59779 59780 59781 59782 59783 59784 59785 59786 59787 59788 59789 59790 59791 59792 59793 59794 59795 59796 59797 59798 59799 59800 59801 59802 59803 59804 59805 59806 59807 59808 59809 59810 59811 59812 59813 59814
pub fn deser_structure_crate_model_instance_storage_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceStorageInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceStorageInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("totalSizeInGB") /* TotalSizeInGB com.amazonaws.ec2#InstanceStorageInfo$TotalSizeInGB */ => {
let var_2910 =
Some(
{
<i64 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 (long: `com.amazonaws.ec2#DiskSize`)"))
}
?
)
;
builder = builder.set_total_size_in_gb(var_2910);
}
,
s if s.matches("disks") /* Disks com.amazonaws.ec2#InstanceStorageInfo$Disks */ => {
let var_2911 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_disk_info_list(&mut tag)
?
)
;
builder = builder.set_disks(var_2911);
}
,
s if s.matches("nvmeSupport") /* NvmeSupport com.amazonaws.ec2#InstanceStorageInfo$NvmeSupport */ => {
let var_2912 =
Some(
Result::<crate::model::EphemeralNvmeSupport, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EphemeralNvmeSupport::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_nvme_support(var_2912);
}
,
s if s.matches("encryptionSupport") /* EncryptionSupport com.amazonaws.ec2#InstanceStorageInfo$EncryptionSupport */ => {
let var_2913 =
Some(
Result::<crate::model::InstanceStorageEncryptionSupport, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceStorageEncryptionSupport::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_encryption_support(var_2913);
}
,
_ => {}
}
}
Ok(builder.build())
}