Struct aws_sdk_appmesh::model::tcp_route::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for TcpRoute
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn action(self, input: TcpRouteAction) -> Self
pub fn action(self, input: TcpRouteAction) -> Self
The action to take if a match is determined.
sourcepub fn set_action(self, input: Option<TcpRouteAction>) -> Self
pub fn set_action(self, input: Option<TcpRouteAction>) -> Self
The action to take if a match is determined.
Examples found in repository?
src/json_deser.rs (lines 4213-4215)
4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252
pub(crate) fn deser_structure_crate_model_tcp_route<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::TcpRoute>, 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::tcp_route::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() {
"action" => {
builder = builder.set_action(
crate::json_deser::deser_structure_crate_model_tcp_route_action(tokens)?
);
}
"timeout" => {
builder = builder.set_timeout(
crate::json_deser::deser_structure_crate_model_tcp_timeout(
tokens,
)?,
);
}
"match" => {
builder = builder.set_match(
crate::json_deser::deser_structure_crate_model_tcp_route_match(
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 timeout(self, input: TcpTimeout) -> Self
pub fn timeout(self, input: TcpTimeout) -> Self
An object that represents types of timeouts.
sourcepub fn set_timeout(self, input: Option<TcpTimeout>) -> Self
pub fn set_timeout(self, input: Option<TcpTimeout>) -> Self
An object that represents types of timeouts.
Examples found in repository?
src/json_deser.rs (lines 4218-4222)
4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252
pub(crate) fn deser_structure_crate_model_tcp_route<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::TcpRoute>, 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::tcp_route::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() {
"action" => {
builder = builder.set_action(
crate::json_deser::deser_structure_crate_model_tcp_route_action(tokens)?
);
}
"timeout" => {
builder = builder.set_timeout(
crate::json_deser::deser_structure_crate_model_tcp_timeout(
tokens,
)?,
);
}
"match" => {
builder = builder.set_match(
crate::json_deser::deser_structure_crate_model_tcp_route_match(
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 match(self, input: TcpRouteMatch) -> Self
pub fn match(self, input: TcpRouteMatch) -> Self
An object that represents the criteria for determining a request match.
sourcepub fn set_match(self, input: Option<TcpRouteMatch>) -> Self
pub fn set_match(self, input: Option<TcpRouteMatch>) -> Self
An object that represents the criteria for determining a request match.
Examples found in repository?
src/json_deser.rs (lines 4225-4229)
4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252
pub(crate) fn deser_structure_crate_model_tcp_route<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::TcpRoute>, 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::tcp_route::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() {
"action" => {
builder = builder.set_action(
crate::json_deser::deser_structure_crate_model_tcp_route_action(tokens)?
);
}
"timeout" => {
builder = builder.set_timeout(
crate::json_deser::deser_structure_crate_model_tcp_timeout(
tokens,
)?,
);
}
"match" => {
builder = builder.set_match(
crate::json_deser::deser_structure_crate_model_tcp_route_match(
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) -> TcpRoute
pub fn build(self) -> TcpRoute
Consumes the builder and constructs a TcpRoute
.
Examples found in repository?
src/json_deser.rs (line 4244)
4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252
pub(crate) fn deser_structure_crate_model_tcp_route<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::TcpRoute>, 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::tcp_route::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() {
"action" => {
builder = builder.set_action(
crate::json_deser::deser_structure_crate_model_tcp_route_action(tokens)?
);
}
"timeout" => {
builder = builder.set_timeout(
crate::json_deser::deser_structure_crate_model_tcp_timeout(
tokens,
)?,
);
}
"match" => {
builder = builder.set_match(
crate::json_deser::deser_structure_crate_model_tcp_route_match(
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",
),
),
}
}