Struct aws_sdk_ec2::model::host_properties::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for HostProperties
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn set_cores(self, input: Option<i32>) -> Self
pub fn set_cores(self, input: Option<i32>) -> Self
The number of cores on the Dedicated Host.
Examples found in repository?
src/xml_deser.rs (line 59143)
59124 59125 59126 59127 59128 59129 59130 59131 59132 59133 59134 59135 59136 59137 59138 59139 59140 59141 59142 59143 59144 59145 59146 59147 59148 59149 59150 59151 59152 59153 59154 59155 59156 59157 59158 59159 59160 59161 59162 59163 59164 59165 59166 59167 59168 59169 59170 59171 59172 59173 59174 59175 59176 59177 59178 59179 59180 59181 59182 59183 59184 59185 59186 59187 59188 59189 59190 59191 59192 59193 59194 59195 59196 59197 59198 59199 59200 59201 59202 59203 59204 59205 59206
pub fn deser_structure_crate_model_host_properties(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::HostProperties, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::HostProperties::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("cores") /* Cores com.amazonaws.ec2#HostProperties$Cores */ => {
let var_2880 =
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#Integer`)"))
}
?
)
;
builder = builder.set_cores(var_2880);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#HostProperties$InstanceType */ => {
let var_2881 =
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_type(var_2881);
}
,
s if s.matches("instanceFamily") /* InstanceFamily com.amazonaws.ec2#HostProperties$InstanceFamily */ => {
let var_2882 =
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_family(var_2882);
}
,
s if s.matches("sockets") /* Sockets com.amazonaws.ec2#HostProperties$Sockets */ => {
let var_2883 =
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#Integer`)"))
}
?
)
;
builder = builder.set_sockets(var_2883);
}
,
s if s.matches("totalVCpus") /* TotalVCpus com.amazonaws.ec2#HostProperties$TotalVCpus */ => {
let var_2884 =
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#Integer`)"))
}
?
)
;
builder = builder.set_total_v_cpus(var_2884);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn instance_type(self, input: impl Into<String>) -> Self
pub fn instance_type(self, input: impl Into<String>) -> Self
The instance type supported by the Dedicated Host. For example, m5.large
. If the host supports multiple instance types, no instanceType is returned.
sourcepub fn set_instance_type(self, input: Option<String>) -> Self
pub fn set_instance_type(self, input: Option<String>) -> Self
The instance type supported by the Dedicated Host. For example, m5.large
. If the host supports multiple instance types, no instanceType is returned.
Examples found in repository?
src/xml_deser.rs (line 59156)
59124 59125 59126 59127 59128 59129 59130 59131 59132 59133 59134 59135 59136 59137 59138 59139 59140 59141 59142 59143 59144 59145 59146 59147 59148 59149 59150 59151 59152 59153 59154 59155 59156 59157 59158 59159 59160 59161 59162 59163 59164 59165 59166 59167 59168 59169 59170 59171 59172 59173 59174 59175 59176 59177 59178 59179 59180 59181 59182 59183 59184 59185 59186 59187 59188 59189 59190 59191 59192 59193 59194 59195 59196 59197 59198 59199 59200 59201 59202 59203 59204 59205 59206
pub fn deser_structure_crate_model_host_properties(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::HostProperties, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::HostProperties::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("cores") /* Cores com.amazonaws.ec2#HostProperties$Cores */ => {
let var_2880 =
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#Integer`)"))
}
?
)
;
builder = builder.set_cores(var_2880);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#HostProperties$InstanceType */ => {
let var_2881 =
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_type(var_2881);
}
,
s if s.matches("instanceFamily") /* InstanceFamily com.amazonaws.ec2#HostProperties$InstanceFamily */ => {
let var_2882 =
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_family(var_2882);
}
,
s if s.matches("sockets") /* Sockets com.amazonaws.ec2#HostProperties$Sockets */ => {
let var_2883 =
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#Integer`)"))
}
?
)
;
builder = builder.set_sockets(var_2883);
}
,
s if s.matches("totalVCpus") /* TotalVCpus com.amazonaws.ec2#HostProperties$TotalVCpus */ => {
let var_2884 =
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#Integer`)"))
}
?
)
;
builder = builder.set_total_v_cpus(var_2884);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn instance_family(self, input: impl Into<String>) -> Self
pub fn instance_family(self, input: impl Into<String>) -> Self
The instance family supported by the Dedicated Host. For example, m5
.
sourcepub fn set_instance_family(self, input: Option<String>) -> Self
pub fn set_instance_family(self, input: Option<String>) -> Self
The instance family supported by the Dedicated Host. For example, m5
.
Examples found in repository?
src/xml_deser.rs (line 59169)
59124 59125 59126 59127 59128 59129 59130 59131 59132 59133 59134 59135 59136 59137 59138 59139 59140 59141 59142 59143 59144 59145 59146 59147 59148 59149 59150 59151 59152 59153 59154 59155 59156 59157 59158 59159 59160 59161 59162 59163 59164 59165 59166 59167 59168 59169 59170 59171 59172 59173 59174 59175 59176 59177 59178 59179 59180 59181 59182 59183 59184 59185 59186 59187 59188 59189 59190 59191 59192 59193 59194 59195 59196 59197 59198 59199 59200 59201 59202 59203 59204 59205 59206
pub fn deser_structure_crate_model_host_properties(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::HostProperties, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::HostProperties::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("cores") /* Cores com.amazonaws.ec2#HostProperties$Cores */ => {
let var_2880 =
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#Integer`)"))
}
?
)
;
builder = builder.set_cores(var_2880);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#HostProperties$InstanceType */ => {
let var_2881 =
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_type(var_2881);
}
,
s if s.matches("instanceFamily") /* InstanceFamily com.amazonaws.ec2#HostProperties$InstanceFamily */ => {
let var_2882 =
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_family(var_2882);
}
,
s if s.matches("sockets") /* Sockets com.amazonaws.ec2#HostProperties$Sockets */ => {
let var_2883 =
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#Integer`)"))
}
?
)
;
builder = builder.set_sockets(var_2883);
}
,
s if s.matches("totalVCpus") /* TotalVCpus com.amazonaws.ec2#HostProperties$TotalVCpus */ => {
let var_2884 =
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#Integer`)"))
}
?
)
;
builder = builder.set_total_v_cpus(var_2884);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn set_sockets(self, input: Option<i32>) -> Self
pub fn set_sockets(self, input: Option<i32>) -> Self
The number of sockets on the Dedicated Host.
Examples found in repository?
src/xml_deser.rs (line 59184)
59124 59125 59126 59127 59128 59129 59130 59131 59132 59133 59134 59135 59136 59137 59138 59139 59140 59141 59142 59143 59144 59145 59146 59147 59148 59149 59150 59151 59152 59153 59154 59155 59156 59157 59158 59159 59160 59161 59162 59163 59164 59165 59166 59167 59168 59169 59170 59171 59172 59173 59174 59175 59176 59177 59178 59179 59180 59181 59182 59183 59184 59185 59186 59187 59188 59189 59190 59191 59192 59193 59194 59195 59196 59197 59198 59199 59200 59201 59202 59203 59204 59205 59206
pub fn deser_structure_crate_model_host_properties(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::HostProperties, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::HostProperties::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("cores") /* Cores com.amazonaws.ec2#HostProperties$Cores */ => {
let var_2880 =
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#Integer`)"))
}
?
)
;
builder = builder.set_cores(var_2880);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#HostProperties$InstanceType */ => {
let var_2881 =
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_type(var_2881);
}
,
s if s.matches("instanceFamily") /* InstanceFamily com.amazonaws.ec2#HostProperties$InstanceFamily */ => {
let var_2882 =
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_family(var_2882);
}
,
s if s.matches("sockets") /* Sockets com.amazonaws.ec2#HostProperties$Sockets */ => {
let var_2883 =
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#Integer`)"))
}
?
)
;
builder = builder.set_sockets(var_2883);
}
,
s if s.matches("totalVCpus") /* TotalVCpus com.amazonaws.ec2#HostProperties$TotalVCpus */ => {
let var_2884 =
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#Integer`)"))
}
?
)
;
builder = builder.set_total_v_cpus(var_2884);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn total_v_cpus(self, input: i32) -> Self
pub fn total_v_cpus(self, input: i32) -> Self
The total number of vCPUs on the Dedicated Host.
sourcepub fn set_total_v_cpus(self, input: Option<i32>) -> Self
pub fn set_total_v_cpus(self, input: Option<i32>) -> Self
The total number of vCPUs on the Dedicated Host.
Examples found in repository?
src/xml_deser.rs (line 59199)
59124 59125 59126 59127 59128 59129 59130 59131 59132 59133 59134 59135 59136 59137 59138 59139 59140 59141 59142 59143 59144 59145 59146 59147 59148 59149 59150 59151 59152 59153 59154 59155 59156 59157 59158 59159 59160 59161 59162 59163 59164 59165 59166 59167 59168 59169 59170 59171 59172 59173 59174 59175 59176 59177 59178 59179 59180 59181 59182 59183 59184 59185 59186 59187 59188 59189 59190 59191 59192 59193 59194 59195 59196 59197 59198 59199 59200 59201 59202 59203 59204 59205 59206
pub fn deser_structure_crate_model_host_properties(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::HostProperties, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::HostProperties::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("cores") /* Cores com.amazonaws.ec2#HostProperties$Cores */ => {
let var_2880 =
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#Integer`)"))
}
?
)
;
builder = builder.set_cores(var_2880);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#HostProperties$InstanceType */ => {
let var_2881 =
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_type(var_2881);
}
,
s if s.matches("instanceFamily") /* InstanceFamily com.amazonaws.ec2#HostProperties$InstanceFamily */ => {
let var_2882 =
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_family(var_2882);
}
,
s if s.matches("sockets") /* Sockets com.amazonaws.ec2#HostProperties$Sockets */ => {
let var_2883 =
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#Integer`)"))
}
?
)
;
builder = builder.set_sockets(var_2883);
}
,
s if s.matches("totalVCpus") /* TotalVCpus com.amazonaws.ec2#HostProperties$TotalVCpus */ => {
let var_2884 =
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#Integer`)"))
}
?
)
;
builder = builder.set_total_v_cpus(var_2884);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> HostProperties
pub fn build(self) -> HostProperties
Consumes the builder and constructs a HostProperties
.
Examples found in repository?
src/xml_deser.rs (line 59205)
59124 59125 59126 59127 59128 59129 59130 59131 59132 59133 59134 59135 59136 59137 59138 59139 59140 59141 59142 59143 59144 59145 59146 59147 59148 59149 59150 59151 59152 59153 59154 59155 59156 59157 59158 59159 59160 59161 59162 59163 59164 59165 59166 59167 59168 59169 59170 59171 59172 59173 59174 59175 59176 59177 59178 59179 59180 59181 59182 59183 59184 59185 59186 59187 59188 59189 59190 59191 59192 59193 59194 59195 59196 59197 59198 59199 59200 59201 59202 59203 59204 59205 59206
pub fn deser_structure_crate_model_host_properties(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::HostProperties, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::HostProperties::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("cores") /* Cores com.amazonaws.ec2#HostProperties$Cores */ => {
let var_2880 =
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#Integer`)"))
}
?
)
;
builder = builder.set_cores(var_2880);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#HostProperties$InstanceType */ => {
let var_2881 =
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_type(var_2881);
}
,
s if s.matches("instanceFamily") /* InstanceFamily com.amazonaws.ec2#HostProperties$InstanceFamily */ => {
let var_2882 =
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_family(var_2882);
}
,
s if s.matches("sockets") /* Sockets com.amazonaws.ec2#HostProperties$Sockets */ => {
let var_2883 =
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#Integer`)"))
}
?
)
;
builder = builder.set_sockets(var_2883);
}
,
s if s.matches("totalVCpus") /* TotalVCpus com.amazonaws.ec2#HostProperties$TotalVCpus */ => {
let var_2884 =
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#Integer`)"))
}
?
)
;
builder = builder.set_total_v_cpus(var_2884);
}
,
_ => {}
}
}
Ok(builder.build())
}