Struct aws_sdk_appmesh::model::grpc_gateway_route_rewrite::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for GrpcGatewayRouteRewrite
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn hostname(self, input: GatewayRouteHostnameRewrite) -> Self
pub fn hostname(self, input: GatewayRouteHostnameRewrite) -> Self
The host name of the gateway route to rewrite.
sourcepub fn set_hostname(self, input: Option<GatewayRouteHostnameRewrite>) -> Self
pub fn set_hostname(self, input: Option<GatewayRouteHostnameRewrite>) -> Self
The host name of the gateway route to rewrite.
Examples found in repository?
src/json_deser.rs (lines 7019-7021)
6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044
pub(crate) fn deser_structure_crate_model_grpc_gateway_route_rewrite<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::GrpcGatewayRouteRewrite>,
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::grpc_gateway_route_rewrite::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() {
"hostname" => {
builder = builder.set_hostname(
crate::json_deser::deser_structure_crate_model_gateway_route_hostname_rewrite(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) -> GrpcGatewayRouteRewrite
pub fn build(self) -> GrpcGatewayRouteRewrite
Consumes the builder and constructs a GrpcGatewayRouteRewrite
.
Examples found in repository?
src/json_deser.rs (line 7036)
6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044
pub(crate) fn deser_structure_crate_model_grpc_gateway_route_rewrite<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::GrpcGatewayRouteRewrite>,
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::grpc_gateway_route_rewrite::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() {
"hostname" => {
builder = builder.set_hostname(
crate::json_deser::deser_structure_crate_model_gateway_route_hostname_rewrite(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",
),
),
}
}