pub struct Builder { /* private fields */ }
Expand description
A builder for RuleGroupSourceStatefulRulesDetails
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn action(self, input: impl Into<String>) -> Self
pub fn action(self, input: impl Into<String>) -> Self
Defines what Network Firewall should do with the packets in a traffic flow when the flow matches the stateful rule criteria.
sourcepub fn set_action(self, input: Option<String>) -> Self
pub fn set_action(self, input: Option<String>) -> Self
Defines what Network Firewall should do with the packets in a traffic flow when the flow matches the stateful rule criteria.
Examples found in repository?
src/json_deser.rs (lines 49710-49716)
49684 49685 49686 49687 49688 49689 49690 49691 49692 49693 49694 49695 49696 49697 49698 49699 49700 49701 49702 49703 49704 49705 49706 49707 49708 49709 49710 49711 49712 49713 49714 49715 49716 49717 49718 49719 49720 49721 49722 49723 49724 49725 49726 49727 49728 49729 49730 49731 49732 49733 49734 49735 49736 49737 49738 49739 49740 49741 49742 49743 49744 49745 49746 49747 49748 49749
pub(crate) fn deser_structure_crate_model_rule_group_source_stateful_rules_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::RuleGroupSourceStatefulRulesDetails>,
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::rule_group_source_stateful_rules_details::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() {
"Action" => {
builder = builder.set_action(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Header" => {
builder = builder.set_header(
crate::json_deser::deser_structure_crate_model_rule_group_source_stateful_rules_header_details(tokens)?
);
}
"RuleOptions" => {
builder = builder.set_rule_options(
crate::json_deser::deser_list_com_amazonaws_securityhub_rule_group_source_stateful_rules_options_list(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 header(self, input: RuleGroupSourceStatefulRulesHeaderDetails) -> Self
pub fn header(self, input: RuleGroupSourceStatefulRulesHeaderDetails) -> Self
The stateful inspection criteria for the rule.
sourcepub fn set_header(
self,
input: Option<RuleGroupSourceStatefulRulesHeaderDetails>
) -> Self
pub fn set_header(
self,
input: Option<RuleGroupSourceStatefulRulesHeaderDetails>
) -> Self
The stateful inspection criteria for the rule.
Examples found in repository?
src/json_deser.rs (lines 49719-49721)
49684 49685 49686 49687 49688 49689 49690 49691 49692 49693 49694 49695 49696 49697 49698 49699 49700 49701 49702 49703 49704 49705 49706 49707 49708 49709 49710 49711 49712 49713 49714 49715 49716 49717 49718 49719 49720 49721 49722 49723 49724 49725 49726 49727 49728 49729 49730 49731 49732 49733 49734 49735 49736 49737 49738 49739 49740 49741 49742 49743 49744 49745 49746 49747 49748 49749
pub(crate) fn deser_structure_crate_model_rule_group_source_stateful_rules_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::RuleGroupSourceStatefulRulesDetails>,
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::rule_group_source_stateful_rules_details::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() {
"Action" => {
builder = builder.set_action(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Header" => {
builder = builder.set_header(
crate::json_deser::deser_structure_crate_model_rule_group_source_stateful_rules_header_details(tokens)?
);
}
"RuleOptions" => {
builder = builder.set_rule_options(
crate::json_deser::deser_list_com_amazonaws_securityhub_rule_group_source_stateful_rules_options_list(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 rule_options(
self,
input: RuleGroupSourceStatefulRulesOptionsDetails
) -> Self
pub fn rule_options(
self,
input: RuleGroupSourceStatefulRulesOptionsDetails
) -> Self
Appends an item to rule_options
.
To override the contents of this collection use set_rule_options
.
Additional options for the rule.
sourcepub fn set_rule_options(
self,
input: Option<Vec<RuleGroupSourceStatefulRulesOptionsDetails>>
) -> Self
pub fn set_rule_options(
self,
input: Option<Vec<RuleGroupSourceStatefulRulesOptionsDetails>>
) -> Self
Additional options for the rule.
Examples found in repository?
src/json_deser.rs (lines 49724-49726)
49684 49685 49686 49687 49688 49689 49690 49691 49692 49693 49694 49695 49696 49697 49698 49699 49700 49701 49702 49703 49704 49705 49706 49707 49708 49709 49710 49711 49712 49713 49714 49715 49716 49717 49718 49719 49720 49721 49722 49723 49724 49725 49726 49727 49728 49729 49730 49731 49732 49733 49734 49735 49736 49737 49738 49739 49740 49741 49742 49743 49744 49745 49746 49747 49748 49749
pub(crate) fn deser_structure_crate_model_rule_group_source_stateful_rules_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::RuleGroupSourceStatefulRulesDetails>,
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::rule_group_source_stateful_rules_details::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() {
"Action" => {
builder = builder.set_action(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Header" => {
builder = builder.set_header(
crate::json_deser::deser_structure_crate_model_rule_group_source_stateful_rules_header_details(tokens)?
);
}
"RuleOptions" => {
builder = builder.set_rule_options(
crate::json_deser::deser_list_com_amazonaws_securityhub_rule_group_source_stateful_rules_options_list(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) -> RuleGroupSourceStatefulRulesDetails
pub fn build(self) -> RuleGroupSourceStatefulRulesDetails
Consumes the builder and constructs a RuleGroupSourceStatefulRulesDetails
.
Examples found in repository?
src/json_deser.rs (line 49741)
49684 49685 49686 49687 49688 49689 49690 49691 49692 49693 49694 49695 49696 49697 49698 49699 49700 49701 49702 49703 49704 49705 49706 49707 49708 49709 49710 49711 49712 49713 49714 49715 49716 49717 49718 49719 49720 49721 49722 49723 49724 49725 49726 49727 49728 49729 49730 49731 49732 49733 49734 49735 49736 49737 49738 49739 49740 49741 49742 49743 49744 49745 49746 49747 49748 49749
pub(crate) fn deser_structure_crate_model_rule_group_source_stateful_rules_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::RuleGroupSourceStatefulRulesDetails>,
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::rule_group_source_stateful_rules_details::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() {
"Action" => {
builder = builder.set_action(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Header" => {
builder = builder.set_header(
crate::json_deser::deser_structure_crate_model_rule_group_source_stateful_rules_header_details(tokens)?
);
}
"RuleOptions" => {
builder = builder.set_rule_options(
crate::json_deser::deser_list_com_amazonaws_securityhub_rule_group_source_stateful_rules_options_list(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",
),
),
}
}