#[non_exhaustive]pub struct SizeConstraintStatementBuilder { /* private fields */ }
Expand description
A builder for SizeConstraintStatement
.
Implementations§
source§impl SizeConstraintStatementBuilder
impl SizeConstraintStatementBuilder
sourcepub fn field_to_match(self, input: FieldToMatch) -> Self
pub fn field_to_match(self, input: FieldToMatch) -> Self
The part of the web request that you want WAF to inspect.
This field is required.sourcepub fn set_field_to_match(self, input: Option<FieldToMatch>) -> Self
pub fn set_field_to_match(self, input: Option<FieldToMatch>) -> Self
The part of the web request that you want WAF to inspect.
sourcepub fn get_field_to_match(&self) -> &Option<FieldToMatch>
pub fn get_field_to_match(&self) -> &Option<FieldToMatch>
The part of the web request that you want WAF to inspect.
sourcepub fn comparison_operator(self, input: ComparisonOperator) -> Self
pub fn comparison_operator(self, input: ComparisonOperator) -> Self
The operator to use to compare the request part to the size setting.
This field is required.sourcepub fn set_comparison_operator(self, input: Option<ComparisonOperator>) -> Self
pub fn set_comparison_operator(self, input: Option<ComparisonOperator>) -> Self
The operator to use to compare the request part to the size setting.
sourcepub fn get_comparison_operator(&self) -> &Option<ComparisonOperator>
pub fn get_comparison_operator(&self) -> &Option<ComparisonOperator>
The operator to use to compare the request part to the size setting.
sourcepub fn size(self, input: i64) -> Self
pub fn size(self, input: i64) -> Self
The size, in byte, to compare to the request part, after any transformations.
This field is required.sourcepub fn set_size(self, input: Option<i64>) -> Self
pub fn set_size(self, input: Option<i64>) -> Self
The size, in byte, to compare to the request part, after any transformations.
sourcepub fn get_size(&self) -> &Option<i64>
pub fn get_size(&self) -> &Option<i64>
The size, in byte, to compare to the request part, after any transformations.
sourcepub fn text_transformations(self, input: TextTransformation) -> Self
pub fn text_transformations(self, input: TextTransformation) -> Self
Appends an item to text_transformations
.
To override the contents of this collection use set_text_transformations
.
Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection. Text transformations are used in rule match statements, to transform the FieldToMatch
request component before inspecting it, and they're used in rate-based rule statements, to transform request components before using them as custom aggregation keys. If you specify one or more transformations to apply, WAF performs all transformations on the specified content, starting from the lowest priority setting, and then uses the transformed component contents.
sourcepub fn set_text_transformations(
self,
input: Option<Vec<TextTransformation>>
) -> Self
pub fn set_text_transformations( self, input: Option<Vec<TextTransformation>> ) -> Self
Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection. Text transformations are used in rule match statements, to transform the FieldToMatch
request component before inspecting it, and they're used in rate-based rule statements, to transform request components before using them as custom aggregation keys. If you specify one or more transformations to apply, WAF performs all transformations on the specified content, starting from the lowest priority setting, and then uses the transformed component contents.
sourcepub fn get_text_transformations(&self) -> &Option<Vec<TextTransformation>>
pub fn get_text_transformations(&self) -> &Option<Vec<TextTransformation>>
Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection. Text transformations are used in rule match statements, to transform the FieldToMatch
request component before inspecting it, and they're used in rate-based rule statements, to transform request components before using them as custom aggregation keys. If you specify one or more transformations to apply, WAF performs all transformations on the specified content, starting from the lowest priority setting, and then uses the transformed component contents.
sourcepub fn build(self) -> Result<SizeConstraintStatement, BuildError>
pub fn build(self) -> Result<SizeConstraintStatement, BuildError>
Consumes the builder and constructs a SizeConstraintStatement
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for SizeConstraintStatementBuilder
impl Clone for SizeConstraintStatementBuilder
source§fn clone(&self) -> SizeConstraintStatementBuilder
fn clone(&self) -> SizeConstraintStatementBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for SizeConstraintStatementBuilder
impl Default for SizeConstraintStatementBuilder
source§fn default() -> SizeConstraintStatementBuilder
fn default() -> SizeConstraintStatementBuilder
source§impl PartialEq for SizeConstraintStatementBuilder
impl PartialEq for SizeConstraintStatementBuilder
source§fn eq(&self, other: &SizeConstraintStatementBuilder) -> bool
fn eq(&self, other: &SizeConstraintStatementBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for SizeConstraintStatementBuilder
Auto Trait Implementations§
impl Freeze for SizeConstraintStatementBuilder
impl RefUnwindSafe for SizeConstraintStatementBuilder
impl Send for SizeConstraintStatementBuilder
impl Sync for SizeConstraintStatementBuilder
impl Unpin for SizeConstraintStatementBuilder
impl UnwindSafe for SizeConstraintStatementBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more