pub struct Builder { /* private fields */ }
Expand description
A builder for StatelessCustomActionDefinition
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn publish_metric_action(
self,
input: StatelessCustomPublishMetricAction
) -> Self
pub fn publish_metric_action(
self,
input: StatelessCustomPublishMetricAction
) -> Self
Information about metrics to publish to CloudWatch.
sourcepub fn set_publish_metric_action(
self,
input: Option<StatelessCustomPublishMetricAction>
) -> Self
pub fn set_publish_metric_action(
self,
input: Option<StatelessCustomPublishMetricAction>
) -> Self
Information about metrics to publish to CloudWatch.
Examples found in repository?
src/json_deser.rs (lines 49657-49659)
49632 49633 49634 49635 49636 49637 49638 49639 49640 49641 49642 49643 49644 49645 49646 49647 49648 49649 49650 49651 49652 49653 49654 49655 49656 49657 49658 49659 49660 49661 49662 49663 49664 49665 49666 49667 49668 49669 49670 49671 49672 49673 49674 49675 49676 49677 49678 49679 49680 49681 49682
pub(crate) fn deser_structure_crate_model_stateless_custom_action_definition<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::StatelessCustomActionDefinition>,
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::stateless_custom_action_definition::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() {
"PublishMetricAction" => {
builder = builder.set_publish_metric_action(
crate::json_deser::deser_structure_crate_model_stateless_custom_publish_metric_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) -> StatelessCustomActionDefinition
pub fn build(self) -> StatelessCustomActionDefinition
Consumes the builder and constructs a StatelessCustomActionDefinition
.
Examples found in repository?
src/json_deser.rs (line 49674)
49632 49633 49634 49635 49636 49637 49638 49639 49640 49641 49642 49643 49644 49645 49646 49647 49648 49649 49650 49651 49652 49653 49654 49655 49656 49657 49658 49659 49660 49661 49662 49663 49664 49665 49666 49667 49668 49669 49670 49671 49672 49673 49674 49675 49676 49677 49678 49679 49680 49681 49682
pub(crate) fn deser_structure_crate_model_stateless_custom_action_definition<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::StatelessCustomActionDefinition>,
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::stateless_custom_action_definition::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() {
"PublishMetricAction" => {
builder = builder.set_publish_metric_action(
crate::json_deser::deser_structure_crate_model_stateless_custom_publish_metric_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",
),
),
}
}