pub struct Builder { /* private fields */ }
Expand description
A builder for PrivateIpAddressSpecification
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn primary(self, input: bool) -> Self
pub fn primary(self, input: bool) -> Self
Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.
sourcepub fn set_primary(self, input: Option<bool>) -> Self
pub fn set_primary(self, input: Option<bool>) -> Self
Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.
Examples found in repository?
src/xml_deser.rs (line 70125)
70106 70107 70108 70109 70110 70111 70112 70113 70114 70115 70116 70117 70118 70119 70120 70121 70122 70123 70124 70125 70126 70127 70128 70129 70130 70131 70132 70133 70134 70135 70136 70137 70138 70139 70140 70141 70142 70143 70144 70145
pub fn deser_structure_crate_model_private_ip_address_specification(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PrivateIpAddressSpecification, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::PrivateIpAddressSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("primary") /* Primary com.amazonaws.ec2#PrivateIpAddressSpecification$Primary */ => {
let var_3469 =
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_primary(var_3469);
}
,
s if s.matches("privateIpAddress") /* PrivateIpAddress com.amazonaws.ec2#PrivateIpAddressSpecification$PrivateIpAddress */ => {
let var_3470 =
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_private_ip_address(var_3470);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn private_ip_address(self, input: impl Into<String>) -> Self
pub fn private_ip_address(self, input: impl Into<String>) -> Self
The private IPv4 address.
sourcepub fn set_private_ip_address(self, input: Option<String>) -> Self
pub fn set_private_ip_address(self, input: Option<String>) -> Self
The private IPv4 address.
Examples found in repository?
src/xml_deser.rs (line 70138)
70106 70107 70108 70109 70110 70111 70112 70113 70114 70115 70116 70117 70118 70119 70120 70121 70122 70123 70124 70125 70126 70127 70128 70129 70130 70131 70132 70133 70134 70135 70136 70137 70138 70139 70140 70141 70142 70143 70144 70145
pub fn deser_structure_crate_model_private_ip_address_specification(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PrivateIpAddressSpecification, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::PrivateIpAddressSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("primary") /* Primary com.amazonaws.ec2#PrivateIpAddressSpecification$Primary */ => {
let var_3469 =
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_primary(var_3469);
}
,
s if s.matches("privateIpAddress") /* PrivateIpAddress com.amazonaws.ec2#PrivateIpAddressSpecification$PrivateIpAddress */ => {
let var_3470 =
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_private_ip_address(var_3470);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> PrivateIpAddressSpecification
pub fn build(self) -> PrivateIpAddressSpecification
Consumes the builder and constructs a PrivateIpAddressSpecification
.
Examples found in repository?
src/xml_deser.rs (line 70144)
70106 70107 70108 70109 70110 70111 70112 70113 70114 70115 70116 70117 70118 70119 70120 70121 70122 70123 70124 70125 70126 70127 70128 70129 70130 70131 70132 70133 70134 70135 70136 70137 70138 70139 70140 70141 70142 70143 70144 70145
pub fn deser_structure_crate_model_private_ip_address_specification(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PrivateIpAddressSpecification, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::PrivateIpAddressSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("primary") /* Primary com.amazonaws.ec2#PrivateIpAddressSpecification$Primary */ => {
let var_3469 =
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_primary(var_3469);
}
,
s if s.matches("privateIpAddress") /* PrivateIpAddress com.amazonaws.ec2#PrivateIpAddressSpecification$PrivateIpAddress */ => {
let var_3470 =
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_private_ip_address(var_3470);
}
,
_ => {}
}
}
Ok(builder.build())
}