pub struct Builder { /* private fields */ }
Expand description
A builder for AwsEc2VpnConnectionOptionsDetails
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn static_routes_only(self, input: bool) -> Self
pub fn static_routes_only(self, input: bool) -> Self
Whether the VPN connection uses static routes only.
sourcepub fn set_static_routes_only(self, input: Option<bool>) -> Self
pub fn set_static_routes_only(self, input: Option<bool>) -> Self
Whether the VPN connection uses static routes only.
Examples found in repository?
src/json_deser.rs (lines 30177-30181)
30151 30152 30153 30154 30155 30156 30157 30158 30159 30160 30161 30162 30163 30164 30165 30166 30167 30168 30169 30170 30171 30172 30173 30174 30175 30176 30177 30178 30179 30180 30181 30182 30183 30184 30185 30186 30187 30188 30189 30190 30191 30192 30193 30194 30195 30196 30197 30198 30199 30200 30201 30202 30203 30204 30205 30206 30207 30208 30209
pub(crate) fn deser_structure_crate_model_aws_ec2_vpn_connection_options_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsEc2VpnConnectionOptionsDetails>,
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_vpn_connection_options_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() {
"StaticRoutesOnly" => {
builder = builder.set_static_routes_only(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"TunnelOptions" => {
builder = builder.set_tunnel_options(
crate::json_deser::deser_list_com_amazonaws_securityhub_aws_ec2_vpn_connection_options_tunnel_options_list(tokens)?
);
}
_ => 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 tunnel_options(
self,
input: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
) -> Self
pub fn tunnel_options(
self,
input: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
) -> Self
Appends an item to tunnel_options
.
To override the contents of this collection use set_tunnel_options
.
The VPN tunnel options.
sourcepub fn set_tunnel_options(
self,
input: Option<Vec<AwsEc2VpnConnectionOptionsTunnelOptionsDetails>>
) -> Self
pub fn set_tunnel_options(
self,
input: Option<Vec<AwsEc2VpnConnectionOptionsTunnelOptionsDetails>>
) -> Self
The VPN tunnel options.
Examples found in repository?
src/json_deser.rs (lines 30184-30186)
30151 30152 30153 30154 30155 30156 30157 30158 30159 30160 30161 30162 30163 30164 30165 30166 30167 30168 30169 30170 30171 30172 30173 30174 30175 30176 30177 30178 30179 30180 30181 30182 30183 30184 30185 30186 30187 30188 30189 30190 30191 30192 30193 30194 30195 30196 30197 30198 30199 30200 30201 30202 30203 30204 30205 30206 30207 30208 30209
pub(crate) fn deser_structure_crate_model_aws_ec2_vpn_connection_options_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsEc2VpnConnectionOptionsDetails>,
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_vpn_connection_options_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() {
"StaticRoutesOnly" => {
builder = builder.set_static_routes_only(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"TunnelOptions" => {
builder = builder.set_tunnel_options(
crate::json_deser::deser_list_com_amazonaws_securityhub_aws_ec2_vpn_connection_options_tunnel_options_list(tokens)?
);
}
_ => 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) -> AwsEc2VpnConnectionOptionsDetails
pub fn build(self) -> AwsEc2VpnConnectionOptionsDetails
Consumes the builder and constructs a AwsEc2VpnConnectionOptionsDetails
.
Examples found in repository?
src/json_deser.rs (line 30201)
30151 30152 30153 30154 30155 30156 30157 30158 30159 30160 30161 30162 30163 30164 30165 30166 30167 30168 30169 30170 30171 30172 30173 30174 30175 30176 30177 30178 30179 30180 30181 30182 30183 30184 30185 30186 30187 30188 30189 30190 30191 30192 30193 30194 30195 30196 30197 30198 30199 30200 30201 30202 30203 30204 30205 30206 30207 30208 30209
pub(crate) fn deser_structure_crate_model_aws_ec2_vpn_connection_options_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsEc2VpnConnectionOptionsDetails>,
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_vpn_connection_options_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() {
"StaticRoutesOnly" => {
builder = builder.set_static_routes_only(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"TunnelOptions" => {
builder = builder.set_tunnel_options(
crate::json_deser::deser_list_com_amazonaws_securityhub_aws_ec2_vpn_connection_options_tunnel_options_list(tokens)?
);
}
_ => 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",
),
),
}
}