1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Provides details about the <code>ByteMatchSet</code>, <code>IPSet</code>, <code>SqlInjectionMatchSet</code>, <code>XssMatchSet</code>, <code>RegexMatchSet</code>, <code>GeoMatchSet</code>, and <code>SizeConstraintSet</code> objects that you want to add to a rule and, for each object, indicates whether you want to negate the settings. </p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AwsWafRulePredicateListDetails {
/// <p>A unique identifier for a predicate in a rule, such as <code>ByteMatchSetId</code> or <code>IPSetId</code>. </p>
pub data_id: ::std::option::Option<::std::string::String>,
/// <p>Specifies if you want WAF to allow, block, or count requests based on the settings in the <code>ByteMatchSet</code>, <code>IPSet</code>, <code>SqlInjectionMatchSet</code>, <code>XssMatchSet</code>, <code>RegexMatchSet</code>, <code>GeoMatchSet</code>, or <code>SizeConstraintSet</code>. </p>
pub negated: ::std::option::Option<bool>,
/// <p>The type of predicate in a rule, such as <code>ByteMatch</code> or <code>IPSet</code>. </p>
pub r#type: ::std::option::Option<::std::string::String>,
}
impl AwsWafRulePredicateListDetails {
/// <p>A unique identifier for a predicate in a rule, such as <code>ByteMatchSetId</code> or <code>IPSetId</code>. </p>
pub fn data_id(&self) -> ::std::option::Option<&str> {
self.data_id.as_deref()
}
/// <p>Specifies if you want WAF to allow, block, or count requests based on the settings in the <code>ByteMatchSet</code>, <code>IPSet</code>, <code>SqlInjectionMatchSet</code>, <code>XssMatchSet</code>, <code>RegexMatchSet</code>, <code>GeoMatchSet</code>, or <code>SizeConstraintSet</code>. </p>
pub fn negated(&self) -> ::std::option::Option<bool> {
self.negated
}
/// <p>The type of predicate in a rule, such as <code>ByteMatch</code> or <code>IPSet</code>. </p>
pub fn r#type(&self) -> ::std::option::Option<&str> {
self.r#type.as_deref()
}
}
impl AwsWafRulePredicateListDetails {
/// Creates a new builder-style object to manufacture [`AwsWafRulePredicateListDetails`](crate::types::AwsWafRulePredicateListDetails).
pub fn builder() -> crate::types::builders::AwsWafRulePredicateListDetailsBuilder {
crate::types::builders::AwsWafRulePredicateListDetailsBuilder::default()
}
}
/// A builder for [`AwsWafRulePredicateListDetails`](crate::types::AwsWafRulePredicateListDetails).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AwsWafRulePredicateListDetailsBuilder {
pub(crate) data_id: ::std::option::Option<::std::string::String>,
pub(crate) negated: ::std::option::Option<bool>,
pub(crate) r#type: ::std::option::Option<::std::string::String>,
}
impl AwsWafRulePredicateListDetailsBuilder {
/// <p>A unique identifier for a predicate in a rule, such as <code>ByteMatchSetId</code> or <code>IPSetId</code>. </p>
pub fn data_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.data_id = ::std::option::Option::Some(input.into());
self
}
/// <p>A unique identifier for a predicate in a rule, such as <code>ByteMatchSetId</code> or <code>IPSetId</code>. </p>
pub fn set_data_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.data_id = input;
self
}
/// <p>A unique identifier for a predicate in a rule, such as <code>ByteMatchSetId</code> or <code>IPSetId</code>. </p>
pub fn get_data_id(&self) -> &::std::option::Option<::std::string::String> {
&self.data_id
}
/// <p>Specifies if you want WAF to allow, block, or count requests based on the settings in the <code>ByteMatchSet</code>, <code>IPSet</code>, <code>SqlInjectionMatchSet</code>, <code>XssMatchSet</code>, <code>RegexMatchSet</code>, <code>GeoMatchSet</code>, or <code>SizeConstraintSet</code>. </p>
pub fn negated(mut self, input: bool) -> Self {
self.negated = ::std::option::Option::Some(input);
self
}
/// <p>Specifies if you want WAF to allow, block, or count requests based on the settings in the <code>ByteMatchSet</code>, <code>IPSet</code>, <code>SqlInjectionMatchSet</code>, <code>XssMatchSet</code>, <code>RegexMatchSet</code>, <code>GeoMatchSet</code>, or <code>SizeConstraintSet</code>. </p>
pub fn set_negated(mut self, input: ::std::option::Option<bool>) -> Self {
self.negated = input;
self
}
/// <p>Specifies if you want WAF to allow, block, or count requests based on the settings in the <code>ByteMatchSet</code>, <code>IPSet</code>, <code>SqlInjectionMatchSet</code>, <code>XssMatchSet</code>, <code>RegexMatchSet</code>, <code>GeoMatchSet</code>, or <code>SizeConstraintSet</code>. </p>
pub fn get_negated(&self) -> &::std::option::Option<bool> {
&self.negated
}
/// <p>The type of predicate in a rule, such as <code>ByteMatch</code> or <code>IPSet</code>. </p>
pub fn r#type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.r#type = ::std::option::Option::Some(input.into());
self
}
/// <p>The type of predicate in a rule, such as <code>ByteMatch</code> or <code>IPSet</code>. </p>
pub fn set_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.r#type = input;
self
}
/// <p>The type of predicate in a rule, such as <code>ByteMatch</code> or <code>IPSet</code>. </p>
pub fn get_type(&self) -> &::std::option::Option<::std::string::String> {
&self.r#type
}
/// Consumes the builder and constructs a [`AwsWafRulePredicateListDetails`](crate::types::AwsWafRulePredicateListDetails).
pub fn build(self) -> crate::types::AwsWafRulePredicateListDetails {
crate::types::AwsWafRulePredicateListDetails {
data_id: self.data_id,
negated: self.negated,
r#type: self.r#type,
}
}
}