Struct aws_sdk_securityhub::model::aws_ec2_vpc_details::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for AwsEc2VpcDetails
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn cidr_block_association_set(self, input: CidrBlockAssociation) -> Self
pub fn cidr_block_association_set(self, input: CidrBlockAssociation) -> Self
Appends an item to cidr_block_association_set
.
To override the contents of this collection use set_cidr_block_association_set
.
Information about the IPv4 CIDR blocks associated with the VPC.
sourcepub fn set_cidr_block_association_set(
self,
input: Option<Vec<CidrBlockAssociation>>
) -> Self
pub fn set_cidr_block_association_set(
self,
input: Option<Vec<CidrBlockAssociation>>
) -> Self
Information about the IPv4 CIDR blocks associated with the VPC.
Examples found in repository?
11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182
pub(crate) fn deser_structure_crate_model_aws_ec2_vpc_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsEc2VpcDetails>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::aws_ec2_vpc_details::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"CidrBlockAssociationSet" => {
builder = builder.set_cidr_block_association_set(
crate::json_deser::deser_list_com_amazonaws_securityhub_cidr_block_association_list(tokens)?
);
}
"Ipv6CidrBlockAssociationSet" => {
builder = builder.set_ipv6_cidr_block_association_set(
crate::json_deser::deser_list_com_amazonaws_securityhub_ipv6_cidr_block_association_list(tokens)?
);
}
"DhcpOptionsId" => {
builder = builder.set_dhcp_options_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"State" => {
builder = builder.set_state(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn ipv6_cidr_block_association_set(
self,
input: Ipv6CidrBlockAssociation
) -> Self
pub fn ipv6_cidr_block_association_set(
self,
input: Ipv6CidrBlockAssociation
) -> Self
Appends an item to ipv6_cidr_block_association_set
.
To override the contents of this collection use set_ipv6_cidr_block_association_set
.
Information about the IPv6 CIDR blocks associated with the VPC.
sourcepub fn set_ipv6_cidr_block_association_set(
self,
input: Option<Vec<Ipv6CidrBlockAssociation>>
) -> Self
pub fn set_ipv6_cidr_block_association_set(
self,
input: Option<Vec<Ipv6CidrBlockAssociation>>
) -> Self
Information about the IPv6 CIDR blocks associated with the VPC.
Examples found in repository?
11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182
pub(crate) fn deser_structure_crate_model_aws_ec2_vpc_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsEc2VpcDetails>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::aws_ec2_vpc_details::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"CidrBlockAssociationSet" => {
builder = builder.set_cidr_block_association_set(
crate::json_deser::deser_list_com_amazonaws_securityhub_cidr_block_association_list(tokens)?
);
}
"Ipv6CidrBlockAssociationSet" => {
builder = builder.set_ipv6_cidr_block_association_set(
crate::json_deser::deser_list_com_amazonaws_securityhub_ipv6_cidr_block_association_list(tokens)?
);
}
"DhcpOptionsId" => {
builder = builder.set_dhcp_options_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"State" => {
builder = builder.set_state(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn dhcp_options_id(self, input: impl Into<String>) -> Self
pub fn dhcp_options_id(self, input: impl Into<String>) -> Self
The identifier of the set of Dynamic Host Configuration Protocol (DHCP) options that are associated with the VPC. If the default options are associated with the VPC, then this is default.
sourcepub fn set_dhcp_options_id(self, input: Option<String>) -> Self
pub fn set_dhcp_options_id(self, input: Option<String>) -> Self
The identifier of the set of Dynamic Host Configuration Protocol (DHCP) options that are associated with the VPC. If the default options are associated with the VPC, then this is default.
Examples found in repository?
11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182
pub(crate) fn deser_structure_crate_model_aws_ec2_vpc_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsEc2VpcDetails>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::aws_ec2_vpc_details::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"CidrBlockAssociationSet" => {
builder = builder.set_cidr_block_association_set(
crate::json_deser::deser_list_com_amazonaws_securityhub_cidr_block_association_list(tokens)?
);
}
"Ipv6CidrBlockAssociationSet" => {
builder = builder.set_ipv6_cidr_block_association_set(
crate::json_deser::deser_list_com_amazonaws_securityhub_ipv6_cidr_block_association_list(tokens)?
);
}
"DhcpOptionsId" => {
builder = builder.set_dhcp_options_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"State" => {
builder = builder.set_state(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn state(self, input: impl Into<String>) -> Self
pub fn state(self, input: impl Into<String>) -> Self
The current state of the VPC. Valid values are available
or pending
.
sourcepub fn set_state(self, input: Option<String>) -> Self
pub fn set_state(self, input: Option<String>) -> Self
The current state of the VPC. Valid values are available
or pending
.
Examples found in repository?
11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182
pub(crate) fn deser_structure_crate_model_aws_ec2_vpc_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsEc2VpcDetails>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::aws_ec2_vpc_details::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"CidrBlockAssociationSet" => {
builder = builder.set_cidr_block_association_set(
crate::json_deser::deser_list_com_amazonaws_securityhub_cidr_block_association_list(tokens)?
);
}
"Ipv6CidrBlockAssociationSet" => {
builder = builder.set_ipv6_cidr_block_association_set(
crate::json_deser::deser_list_com_amazonaws_securityhub_ipv6_cidr_block_association_list(tokens)?
);
}
"DhcpOptionsId" => {
builder = builder.set_dhcp_options_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"State" => {
builder = builder.set_state(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn build(self) -> AwsEc2VpcDetails
pub fn build(self) -> AwsEc2VpcDetails
Consumes the builder and constructs a AwsEc2VpcDetails
.
Examples found in repository?
11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182
pub(crate) fn deser_structure_crate_model_aws_ec2_vpc_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsEc2VpcDetails>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::aws_ec2_vpc_details::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"CidrBlockAssociationSet" => {
builder = builder.set_cidr_block_association_set(
crate::json_deser::deser_list_com_amazonaws_securityhub_cidr_block_association_list(tokens)?
);
}
"Ipv6CidrBlockAssociationSet" => {
builder = builder.set_ipv6_cidr_block_association_set(
crate::json_deser::deser_list_com_amazonaws_securityhub_ipv6_cidr_block_association_list(tokens)?
);
}
"DhcpOptionsId" => {
builder = builder.set_dhcp_options_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"State" => {
builder = builder.set_state(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}