Struct aws_sdk_appmesh::model::grpc_gateway_route::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for GrpcGatewayRoute
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn match(self, input: GrpcGatewayRouteMatch) -> Self
pub fn match(self, input: GrpcGatewayRouteMatch) -> Self
An object that represents the criteria for determining a request match.
sourcepub fn set_match(self, input: Option<GrpcGatewayRouteMatch>) -> Self
pub fn set_match(self, input: Option<GrpcGatewayRouteMatch>) -> Self
An object that represents the criteria for determining a request match.
Examples found in repository?
src/json_deser.rs (lines 3977-3979)
3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007
pub(crate) fn deser_structure_crate_model_grpc_gateway_route<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::GrpcGatewayRoute>,
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::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() {
"match" => {
builder = builder.set_match(
crate::json_deser::deser_structure_crate_model_grpc_gateway_route_match(tokens)?
);
}
"action" => {
builder = builder.set_action(
crate::json_deser::deser_structure_crate_model_grpc_gateway_route_action(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 action(self, input: GrpcGatewayRouteAction) -> Self
pub fn action(self, input: GrpcGatewayRouteAction) -> Self
An object that represents the action to take if a match is determined.
sourcepub fn set_action(self, input: Option<GrpcGatewayRouteAction>) -> Self
pub fn set_action(self, input: Option<GrpcGatewayRouteAction>) -> Self
An object that represents the action to take if a match is determined.
Examples found in repository?
src/json_deser.rs (lines 3982-3984)
3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007
pub(crate) fn deser_structure_crate_model_grpc_gateway_route<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::GrpcGatewayRoute>,
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::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() {
"match" => {
builder = builder.set_match(
crate::json_deser::deser_structure_crate_model_grpc_gateway_route_match(tokens)?
);
}
"action" => {
builder = builder.set_action(
crate::json_deser::deser_structure_crate_model_grpc_gateway_route_action(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) -> GrpcGatewayRoute
pub fn build(self) -> GrpcGatewayRoute
Consumes the builder and constructs a GrpcGatewayRoute
.
Examples found in repository?
src/json_deser.rs (line 3999)
3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007
pub(crate) fn deser_structure_crate_model_grpc_gateway_route<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::GrpcGatewayRoute>,
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::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() {
"match" => {
builder = builder.set_match(
crate::json_deser::deser_structure_crate_model_grpc_gateway_route_match(tokens)?
);
}
"action" => {
builder = builder.set_action(
crate::json_deser::deser_structure_crate_model_grpc_gateway_route_action(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",
),
),
}
}