Struct aws_sdk_lexmodelsv2::model::text_log_destination::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for TextLogDestination.
Implementations§
source§impl Builder
impl Builder
sourcepub fn cloud_watch(self, input: CloudWatchLogGroupLogDestination) -> Self
pub fn cloud_watch(self, input: CloudWatchLogGroupLogDestination) -> Self
Defines the Amazon CloudWatch Logs log group where text and metadata logs are delivered.
sourcepub fn set_cloud_watch(
self,
input: Option<CloudWatchLogGroupLogDestination>
) -> Self
pub fn set_cloud_watch(
self,
input: Option<CloudWatchLogGroupLogDestination>
) -> Self
Defines the Amazon CloudWatch Logs log group where text and metadata logs are delivered.
Examples found in repository?
src/json_deser.rs (lines 14401-14403)
14376 14377 14378 14379 14380 14381 14382 14383 14384 14385 14386 14387 14388 14389 14390 14391 14392 14393 14394 14395 14396 14397 14398 14399 14400 14401 14402 14403 14404 14405 14406 14407 14408 14409 14410 14411 14412 14413 14414 14415 14416 14417 14418 14419 14420 14421 14422 14423 14424 14425 14426
pub(crate) fn deser_structure_crate_model_text_log_destination<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::TextLogDestination>,
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::text_log_destination::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() {
"cloudWatch" => {
builder = builder.set_cloud_watch(
crate::json_deser::deser_structure_crate_model_cloud_watch_log_group_log_destination(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) -> TextLogDestination
pub fn build(self) -> TextLogDestination
Consumes the builder and constructs a TextLogDestination.
Examples found in repository?
src/json_deser.rs (line 14418)
14376 14377 14378 14379 14380 14381 14382 14383 14384 14385 14386 14387 14388 14389 14390 14391 14392 14393 14394 14395 14396 14397 14398 14399 14400 14401 14402 14403 14404 14405 14406 14407 14408 14409 14410 14411 14412 14413 14414 14415 14416 14417 14418 14419 14420 14421 14422 14423 14424 14425 14426
pub(crate) fn deser_structure_crate_model_text_log_destination<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::TextLogDestination>,
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::text_log_destination::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() {
"cloudWatch" => {
builder = builder.set_cloud_watch(
crate::json_deser::deser_structure_crate_model_cloud_watch_log_group_log_destination(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",
),
),
}
}