Struct aws_sdk_ec2::model::gpu_device_info::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for GpuDeviceInfo.
Implementations§
source§impl Builder
impl Builder
sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
The name of the GPU accelerator.
Examples found in repository?
src/xml_deser.rs (line 68983)
68966 68967 68968 68969 68970 68971 68972 68973 68974 68975 68976 68977 68978 68979 68980 68981 68982 68983 68984 68985 68986 68987 68988 68989 68990 68991 68992 68993 68994 68995 68996 68997 68998 68999 69000 69001 69002 69003 69004 69005 69006 69007 69008 69009 69010 69011 69012 69013 69014 69015 69016 69017 69018 69019 69020 69021 69022 69023 69024 69025 69026 69027 69028
pub fn deser_structure_crate_model_gpu_device_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::GpuDeviceInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::GpuDeviceInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("name") /* Name com.amazonaws.ec2#GpuDeviceInfo$Name */ => {
let var_3400 =
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_name(var_3400);
}
,
s if s.matches("manufacturer") /* Manufacturer com.amazonaws.ec2#GpuDeviceInfo$Manufacturer */ => {
let var_3401 =
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_manufacturer(var_3401);
}
,
s if s.matches("count") /* Count com.amazonaws.ec2#GpuDeviceInfo$Count */ => {
let var_3402 =
Some(
{
<i32 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 (integer: `com.amazonaws.ec2#GpuDeviceCount`)"))
}
?
)
;
builder = builder.set_count(var_3402);
}
,
s if s.matches("memoryInfo") /* MemoryInfo com.amazonaws.ec2#GpuDeviceInfo$MemoryInfo */ => {
let var_3403 =
Some(
crate::xml_deser::deser_structure_crate_model_gpu_device_memory_info(&mut tag)
?
)
;
builder = builder.set_memory_info(var_3403);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn manufacturer(self, input: impl Into<String>) -> Self
pub fn manufacturer(self, input: impl Into<String>) -> Self
The manufacturer of the GPU accelerator.
sourcepub fn set_manufacturer(self, input: Option<String>) -> Self
pub fn set_manufacturer(self, input: Option<String>) -> Self
The manufacturer of the GPU accelerator.
Examples found in repository?
src/xml_deser.rs (line 68996)
68966 68967 68968 68969 68970 68971 68972 68973 68974 68975 68976 68977 68978 68979 68980 68981 68982 68983 68984 68985 68986 68987 68988 68989 68990 68991 68992 68993 68994 68995 68996 68997 68998 68999 69000 69001 69002 69003 69004 69005 69006 69007 69008 69009 69010 69011 69012 69013 69014 69015 69016 69017 69018 69019 69020 69021 69022 69023 69024 69025 69026 69027 69028
pub fn deser_structure_crate_model_gpu_device_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::GpuDeviceInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::GpuDeviceInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("name") /* Name com.amazonaws.ec2#GpuDeviceInfo$Name */ => {
let var_3400 =
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_name(var_3400);
}
,
s if s.matches("manufacturer") /* Manufacturer com.amazonaws.ec2#GpuDeviceInfo$Manufacturer */ => {
let var_3401 =
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_manufacturer(var_3401);
}
,
s if s.matches("count") /* Count com.amazonaws.ec2#GpuDeviceInfo$Count */ => {
let var_3402 =
Some(
{
<i32 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 (integer: `com.amazonaws.ec2#GpuDeviceCount`)"))
}
?
)
;
builder = builder.set_count(var_3402);
}
,
s if s.matches("memoryInfo") /* MemoryInfo com.amazonaws.ec2#GpuDeviceInfo$MemoryInfo */ => {
let var_3403 =
Some(
crate::xml_deser::deser_structure_crate_model_gpu_device_memory_info(&mut tag)
?
)
;
builder = builder.set_memory_info(var_3403);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn set_count(self, input: Option<i32>) -> Self
pub fn set_count(self, input: Option<i32>) -> Self
The number of GPUs for the instance type.
Examples found in repository?
src/xml_deser.rs (line 69011)
68966 68967 68968 68969 68970 68971 68972 68973 68974 68975 68976 68977 68978 68979 68980 68981 68982 68983 68984 68985 68986 68987 68988 68989 68990 68991 68992 68993 68994 68995 68996 68997 68998 68999 69000 69001 69002 69003 69004 69005 69006 69007 69008 69009 69010 69011 69012 69013 69014 69015 69016 69017 69018 69019 69020 69021 69022 69023 69024 69025 69026 69027 69028
pub fn deser_structure_crate_model_gpu_device_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::GpuDeviceInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::GpuDeviceInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("name") /* Name com.amazonaws.ec2#GpuDeviceInfo$Name */ => {
let var_3400 =
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_name(var_3400);
}
,
s if s.matches("manufacturer") /* Manufacturer com.amazonaws.ec2#GpuDeviceInfo$Manufacturer */ => {
let var_3401 =
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_manufacturer(var_3401);
}
,
s if s.matches("count") /* Count com.amazonaws.ec2#GpuDeviceInfo$Count */ => {
let var_3402 =
Some(
{
<i32 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 (integer: `com.amazonaws.ec2#GpuDeviceCount`)"))
}
?
)
;
builder = builder.set_count(var_3402);
}
,
s if s.matches("memoryInfo") /* MemoryInfo com.amazonaws.ec2#GpuDeviceInfo$MemoryInfo */ => {
let var_3403 =
Some(
crate::xml_deser::deser_structure_crate_model_gpu_device_memory_info(&mut tag)
?
)
;
builder = builder.set_memory_info(var_3403);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn memory_info(self, input: GpuDeviceMemoryInfo) -> Self
pub fn memory_info(self, input: GpuDeviceMemoryInfo) -> Self
Describes the memory available to the GPU accelerator.
sourcepub fn set_memory_info(self, input: Option<GpuDeviceMemoryInfo>) -> Self
pub fn set_memory_info(self, input: Option<GpuDeviceMemoryInfo>) -> Self
Describes the memory available to the GPU accelerator.
Examples found in repository?
src/xml_deser.rs (line 69021)
68966 68967 68968 68969 68970 68971 68972 68973 68974 68975 68976 68977 68978 68979 68980 68981 68982 68983 68984 68985 68986 68987 68988 68989 68990 68991 68992 68993 68994 68995 68996 68997 68998 68999 69000 69001 69002 69003 69004 69005 69006 69007 69008 69009 69010 69011 69012 69013 69014 69015 69016 69017 69018 69019 69020 69021 69022 69023 69024 69025 69026 69027 69028
pub fn deser_structure_crate_model_gpu_device_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::GpuDeviceInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::GpuDeviceInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("name") /* Name com.amazonaws.ec2#GpuDeviceInfo$Name */ => {
let var_3400 =
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_name(var_3400);
}
,
s if s.matches("manufacturer") /* Manufacturer com.amazonaws.ec2#GpuDeviceInfo$Manufacturer */ => {
let var_3401 =
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_manufacturer(var_3401);
}
,
s if s.matches("count") /* Count com.amazonaws.ec2#GpuDeviceInfo$Count */ => {
let var_3402 =
Some(
{
<i32 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 (integer: `com.amazonaws.ec2#GpuDeviceCount`)"))
}
?
)
;
builder = builder.set_count(var_3402);
}
,
s if s.matches("memoryInfo") /* MemoryInfo com.amazonaws.ec2#GpuDeviceInfo$MemoryInfo */ => {
let var_3403 =
Some(
crate::xml_deser::deser_structure_crate_model_gpu_device_memory_info(&mut tag)
?
)
;
builder = builder.set_memory_info(var_3403);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn build(self) -> GpuDeviceInfo
pub fn build(self) -> GpuDeviceInfo
Consumes the builder and constructs a GpuDeviceInfo.
Examples found in repository?
src/xml_deser.rs (line 69027)
68966 68967 68968 68969 68970 68971 68972 68973 68974 68975 68976 68977 68978 68979 68980 68981 68982 68983 68984 68985 68986 68987 68988 68989 68990 68991 68992 68993 68994 68995 68996 68997 68998 68999 69000 69001 69002 69003 69004 69005 69006 69007 69008 69009 69010 69011 69012 69013 69014 69015 69016 69017 69018 69019 69020 69021 69022 69023 69024 69025 69026 69027 69028
pub fn deser_structure_crate_model_gpu_device_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::GpuDeviceInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::GpuDeviceInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("name") /* Name com.amazonaws.ec2#GpuDeviceInfo$Name */ => {
let var_3400 =
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_name(var_3400);
}
,
s if s.matches("manufacturer") /* Manufacturer com.amazonaws.ec2#GpuDeviceInfo$Manufacturer */ => {
let var_3401 =
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_manufacturer(var_3401);
}
,
s if s.matches("count") /* Count com.amazonaws.ec2#GpuDeviceInfo$Count */ => {
let var_3402 =
Some(
{
<i32 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 (integer: `com.amazonaws.ec2#GpuDeviceCount`)"))
}
?
)
;
builder = builder.set_count(var_3402);
}
,
s if s.matches("memoryInfo") /* MemoryInfo com.amazonaws.ec2#GpuDeviceInfo$MemoryInfo */ => {
let var_3403 =
Some(
crate::xml_deser::deser_structure_crate_model_gpu_device_memory_info(&mut tag)
?
)
;
builder = builder.set_memory_info(var_3403);
}
,
_ => {}
}
}
Ok(builder.build())
}