Struct aws_sdk_ec2::model::public_ipv4_pool_range::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for PublicIpv4PoolRange
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn first_address(self, input: impl Into<String>) -> Self
pub fn first_address(self, input: impl Into<String>) -> Self
The first IP address in the range.
sourcepub fn set_first_address(self, input: Option<String>) -> Self
pub fn set_first_address(self, input: Option<String>) -> Self
The first IP address in the range.
Examples found in repository?
src/xml_deser.rs (line 38167)
38150 38151 38152 38153 38154 38155 38156 38157 38158 38159 38160 38161 38162 38163 38164 38165 38166 38167 38168 38169 38170 38171 38172 38173 38174 38175 38176 38177 38178 38179 38180 38181 38182 38183 38184 38185 38186 38187 38188 38189 38190 38191 38192 38193 38194 38195 38196 38197 38198 38199 38200 38201 38202 38203 38204 38205 38206 38207 38208 38209 38210 38211 38212 38213 38214 38215 38216 38217
pub fn deser_structure_crate_model_public_ipv4_pool_range(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PublicIpv4PoolRange, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::PublicIpv4PoolRange::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("firstAddress") /* FirstAddress com.amazonaws.ec2#PublicIpv4PoolRange$FirstAddress */ => {
let var_1605 =
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_first_address(var_1605);
}
,
s if s.matches("lastAddress") /* LastAddress com.amazonaws.ec2#PublicIpv4PoolRange$LastAddress */ => {
let var_1606 =
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_last_address(var_1606);
}
,
s if s.matches("addressCount") /* AddressCount com.amazonaws.ec2#PublicIpv4PoolRange$AddressCount */ => {
let var_1607 =
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_address_count(var_1607);
}
,
s if s.matches("availableAddressCount") /* AvailableAddressCount com.amazonaws.ec2#PublicIpv4PoolRange$AvailableAddressCount */ => {
let var_1608 =
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_available_address_count(var_1608);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn last_address(self, input: impl Into<String>) -> Self
pub fn last_address(self, input: impl Into<String>) -> Self
The last IP address in the range.
sourcepub fn set_last_address(self, input: Option<String>) -> Self
pub fn set_last_address(self, input: Option<String>) -> Self
The last IP address in the range.
Examples found in repository?
src/xml_deser.rs (line 38180)
38150 38151 38152 38153 38154 38155 38156 38157 38158 38159 38160 38161 38162 38163 38164 38165 38166 38167 38168 38169 38170 38171 38172 38173 38174 38175 38176 38177 38178 38179 38180 38181 38182 38183 38184 38185 38186 38187 38188 38189 38190 38191 38192 38193 38194 38195 38196 38197 38198 38199 38200 38201 38202 38203 38204 38205 38206 38207 38208 38209 38210 38211 38212 38213 38214 38215 38216 38217
pub fn deser_structure_crate_model_public_ipv4_pool_range(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PublicIpv4PoolRange, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::PublicIpv4PoolRange::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("firstAddress") /* FirstAddress com.amazonaws.ec2#PublicIpv4PoolRange$FirstAddress */ => {
let var_1605 =
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_first_address(var_1605);
}
,
s if s.matches("lastAddress") /* LastAddress com.amazonaws.ec2#PublicIpv4PoolRange$LastAddress */ => {
let var_1606 =
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_last_address(var_1606);
}
,
s if s.matches("addressCount") /* AddressCount com.amazonaws.ec2#PublicIpv4PoolRange$AddressCount */ => {
let var_1607 =
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_address_count(var_1607);
}
,
s if s.matches("availableAddressCount") /* AvailableAddressCount com.amazonaws.ec2#PublicIpv4PoolRange$AvailableAddressCount */ => {
let var_1608 =
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_available_address_count(var_1608);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn address_count(self, input: i32) -> Self
pub fn address_count(self, input: i32) -> Self
The number of addresses in the range.
sourcepub fn set_address_count(self, input: Option<i32>) -> Self
pub fn set_address_count(self, input: Option<i32>) -> Self
The number of addresses in the range.
Examples found in repository?
src/xml_deser.rs (line 38195)
38150 38151 38152 38153 38154 38155 38156 38157 38158 38159 38160 38161 38162 38163 38164 38165 38166 38167 38168 38169 38170 38171 38172 38173 38174 38175 38176 38177 38178 38179 38180 38181 38182 38183 38184 38185 38186 38187 38188 38189 38190 38191 38192 38193 38194 38195 38196 38197 38198 38199 38200 38201 38202 38203 38204 38205 38206 38207 38208 38209 38210 38211 38212 38213 38214 38215 38216 38217
pub fn deser_structure_crate_model_public_ipv4_pool_range(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PublicIpv4PoolRange, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::PublicIpv4PoolRange::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("firstAddress") /* FirstAddress com.amazonaws.ec2#PublicIpv4PoolRange$FirstAddress */ => {
let var_1605 =
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_first_address(var_1605);
}
,
s if s.matches("lastAddress") /* LastAddress com.amazonaws.ec2#PublicIpv4PoolRange$LastAddress */ => {
let var_1606 =
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_last_address(var_1606);
}
,
s if s.matches("addressCount") /* AddressCount com.amazonaws.ec2#PublicIpv4PoolRange$AddressCount */ => {
let var_1607 =
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_address_count(var_1607);
}
,
s if s.matches("availableAddressCount") /* AvailableAddressCount com.amazonaws.ec2#PublicIpv4PoolRange$AvailableAddressCount */ => {
let var_1608 =
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_available_address_count(var_1608);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn available_address_count(self, input: i32) -> Self
pub fn available_address_count(self, input: i32) -> Self
The number of available addresses in the range.
sourcepub fn set_available_address_count(self, input: Option<i32>) -> Self
pub fn set_available_address_count(self, input: Option<i32>) -> Self
The number of available addresses in the range.
Examples found in repository?
src/xml_deser.rs (line 38210)
38150 38151 38152 38153 38154 38155 38156 38157 38158 38159 38160 38161 38162 38163 38164 38165 38166 38167 38168 38169 38170 38171 38172 38173 38174 38175 38176 38177 38178 38179 38180 38181 38182 38183 38184 38185 38186 38187 38188 38189 38190 38191 38192 38193 38194 38195 38196 38197 38198 38199 38200 38201 38202 38203 38204 38205 38206 38207 38208 38209 38210 38211 38212 38213 38214 38215 38216 38217
pub fn deser_structure_crate_model_public_ipv4_pool_range(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PublicIpv4PoolRange, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::PublicIpv4PoolRange::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("firstAddress") /* FirstAddress com.amazonaws.ec2#PublicIpv4PoolRange$FirstAddress */ => {
let var_1605 =
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_first_address(var_1605);
}
,
s if s.matches("lastAddress") /* LastAddress com.amazonaws.ec2#PublicIpv4PoolRange$LastAddress */ => {
let var_1606 =
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_last_address(var_1606);
}
,
s if s.matches("addressCount") /* AddressCount com.amazonaws.ec2#PublicIpv4PoolRange$AddressCount */ => {
let var_1607 =
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_address_count(var_1607);
}
,
s if s.matches("availableAddressCount") /* AvailableAddressCount com.amazonaws.ec2#PublicIpv4PoolRange$AvailableAddressCount */ => {
let var_1608 =
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_available_address_count(var_1608);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> PublicIpv4PoolRange
pub fn build(self) -> PublicIpv4PoolRange
Consumes the builder and constructs a PublicIpv4PoolRange
.
Examples found in repository?
src/xml_deser.rs (line 38216)
38150 38151 38152 38153 38154 38155 38156 38157 38158 38159 38160 38161 38162 38163 38164 38165 38166 38167 38168 38169 38170 38171 38172 38173 38174 38175 38176 38177 38178 38179 38180 38181 38182 38183 38184 38185 38186 38187 38188 38189 38190 38191 38192 38193 38194 38195 38196 38197 38198 38199 38200 38201 38202 38203 38204 38205 38206 38207 38208 38209 38210 38211 38212 38213 38214 38215 38216 38217
pub fn deser_structure_crate_model_public_ipv4_pool_range(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PublicIpv4PoolRange, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::PublicIpv4PoolRange::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("firstAddress") /* FirstAddress com.amazonaws.ec2#PublicIpv4PoolRange$FirstAddress */ => {
let var_1605 =
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_first_address(var_1605);
}
,
s if s.matches("lastAddress") /* LastAddress com.amazonaws.ec2#PublicIpv4PoolRange$LastAddress */ => {
let var_1606 =
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_last_address(var_1606);
}
,
s if s.matches("addressCount") /* AddressCount com.amazonaws.ec2#PublicIpv4PoolRange$AddressCount */ => {
let var_1607 =
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_address_count(var_1607);
}
,
s if s.matches("availableAddressCount") /* AvailableAddressCount com.amazonaws.ec2#PublicIpv4PoolRange$AvailableAddressCount */ => {
let var_1608 =
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_available_address_count(var_1608);
}
,
_ => {}
}
}
Ok(builder.build())
}