Struct aws_sdk_appmesh::model::virtual_gateway_logging::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for VirtualGatewayLogging
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn access_log(self, input: VirtualGatewayAccessLog) -> Self
pub fn access_log(self, input: VirtualGatewayAccessLog) -> Self
The access log configuration.
sourcepub fn set_access_log(self, input: Option<VirtualGatewayAccessLog>) -> Self
pub fn set_access_log(self, input: Option<VirtualGatewayAccessLog>) -> Self
The access log configuration.
Examples found in repository?
src/json_deser.rs (lines 4442-4444)
4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467
pub(crate) fn deser_structure_crate_model_virtual_gateway_logging<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::VirtualGatewayLogging>,
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::virtual_gateway_logging::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() {
"accessLog" => {
builder = builder.set_access_log(
crate::json_deser::deser_union_crate_model_virtual_gateway_access_log(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) -> VirtualGatewayLogging
pub fn build(self) -> VirtualGatewayLogging
Consumes the builder and constructs a VirtualGatewayLogging
.
Examples found in repository?
src/json_deser.rs (line 4459)
4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467
pub(crate) fn deser_structure_crate_model_virtual_gateway_logging<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::VirtualGatewayLogging>,
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::virtual_gateway_logging::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() {
"accessLog" => {
builder = builder.set_access_log(
crate::json_deser::deser_union_crate_model_virtual_gateway_access_log(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",
),
),
}
}