#[non_exhaustive]
pub struct SampledHttpRequestBuilder { /* private fields */ }
Expand description

A builder for SampledHttpRequest.

Implementations§

source§

impl SampledHttpRequestBuilder

source

pub fn request(self, input: HttpRequest) -> Self

A complex type that contains detailed information about the request.

This field is required.
source

pub fn set_request(self, input: Option<HttpRequest>) -> Self

A complex type that contains detailed information about the request.

source

pub fn get_request(&self) -> &Option<HttpRequest>

A complex type that contains detailed information about the request.

source

pub fn weight(self, input: i64) -> Self

A value that indicates how one result in the response relates proportionally to other results in the response. For example, a result that has a weight of 2 represents roughly twice as many web requests as a result that has a weight of 1.

This field is required.
source

pub fn set_weight(self, input: Option<i64>) -> Self

A value that indicates how one result in the response relates proportionally to other results in the response. For example, a result that has a weight of 2 represents roughly twice as many web requests as a result that has a weight of 1.

source

pub fn get_weight(&self) -> &Option<i64>

A value that indicates how one result in the response relates proportionally to other results in the response. For example, a result that has a weight of 2 represents roughly twice as many web requests as a result that has a weight of 1.

source

pub fn timestamp(self, input: DateTime) -> Self

The time at which WAF received the request from your Amazon Web Services resource, in Unix time format (in seconds).

source

pub fn set_timestamp(self, input: Option<DateTime>) -> Self

The time at which WAF received the request from your Amazon Web Services resource, in Unix time format (in seconds).

source

pub fn get_timestamp(&self) -> &Option<DateTime>

The time at which WAF received the request from your Amazon Web Services resource, in Unix time format (in seconds).

source

pub fn action(self, input: impl Into<String>) -> Self

The action that WAF applied to the request.

source

pub fn set_action(self, input: Option<String>) -> Self

The action that WAF applied to the request.

source

pub fn get_action(&self) -> &Option<String>

The action that WAF applied to the request.

source

pub fn rule_name_within_rule_group(self, input: impl Into<String>) -> Self

The name of the Rule that the request matched. For managed rule groups, the format for this name is # # . For your own rule groups, the format for this name is # . If the rule is not in a rule group, this field is absent.

source

pub fn set_rule_name_within_rule_group(self, input: Option<String>) -> Self

The name of the Rule that the request matched. For managed rule groups, the format for this name is # # . For your own rule groups, the format for this name is # . If the rule is not in a rule group, this field is absent.

source

pub fn get_rule_name_within_rule_group(&self) -> &Option<String>

The name of the Rule that the request matched. For managed rule groups, the format for this name is # # . For your own rule groups, the format for this name is # . If the rule is not in a rule group, this field is absent.

source

pub fn request_headers_inserted(self, input: HttpHeader) -> Self

Appends an item to request_headers_inserted.

To override the contents of this collection use set_request_headers_inserted.

Custom request headers inserted by WAF into the request, according to the custom request configuration for the matching rule action.

source

pub fn set_request_headers_inserted( self, input: Option<Vec<HttpHeader>> ) -> Self

Custom request headers inserted by WAF into the request, according to the custom request configuration for the matching rule action.

source

pub fn get_request_headers_inserted(&self) -> &Option<Vec<HttpHeader>>

Custom request headers inserted by WAF into the request, according to the custom request configuration for the matching rule action.

source

pub fn response_code_sent(self, input: i32) -> Self

The response code that was sent for the request.

source

pub fn set_response_code_sent(self, input: Option<i32>) -> Self

The response code that was sent for the request.

source

pub fn get_response_code_sent(&self) -> &Option<i32>

The response code that was sent for the request.

source

pub fn labels(self, input: Label) -> Self

Appends an item to labels.

To override the contents of this collection use set_labels.

Labels applied to the web request by matching rules. WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.

For example, awswaf:111122223333:myRuleGroup:testRules:testNS1:testNS2:labelNameA or awswaf:managed:aws:managed-rule-set:header:encoding:utf8.

source

pub fn set_labels(self, input: Option<Vec<Label>>) -> Self

Labels applied to the web request by matching rules. WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.

For example, awswaf:111122223333:myRuleGroup:testRules:testNS1:testNS2:labelNameA or awswaf:managed:aws:managed-rule-set:header:encoding:utf8.

source

pub fn get_labels(&self) -> &Option<Vec<Label>>

Labels applied to the web request by matching rules. WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.

For example, awswaf:111122223333:myRuleGroup:testRules:testNS1:testNS2:labelNameA or awswaf:managed:aws:managed-rule-set:header:encoding:utf8.

source

pub fn captcha_response(self, input: CaptchaResponse) -> Self

The CAPTCHA response for the request.

source

pub fn set_captcha_response(self, input: Option<CaptchaResponse>) -> Self

The CAPTCHA response for the request.

source

pub fn get_captcha_response(&self) -> &Option<CaptchaResponse>

The CAPTCHA response for the request.

source

pub fn challenge_response(self, input: ChallengeResponse) -> Self

The Challenge response for the request.

source

pub fn set_challenge_response(self, input: Option<ChallengeResponse>) -> Self

The Challenge response for the request.

source

pub fn get_challenge_response(&self) -> &Option<ChallengeResponse>

The Challenge response for the request.

source

pub fn overridden_action(self, input: impl Into<String>) -> Self

Used only for rule group rules that have a rule action override in place in the web ACL. This is the action that the rule group rule is configured for, and not the action that was applied to the request. The action that WAF applied is the Action value.

source

pub fn set_overridden_action(self, input: Option<String>) -> Self

Used only for rule group rules that have a rule action override in place in the web ACL. This is the action that the rule group rule is configured for, and not the action that was applied to the request. The action that WAF applied is the Action value.

source

pub fn get_overridden_action(&self) -> &Option<String>

Used only for rule group rules that have a rule action override in place in the web ACL. This is the action that the rule group rule is configured for, and not the action that was applied to the request. The action that WAF applied is the Action value.

source

pub fn build(self) -> SampledHttpRequest

Consumes the builder and constructs a SampledHttpRequest.

Trait Implementations§

source§

impl Clone for SampledHttpRequestBuilder

source§

fn clone(&self) -> SampledHttpRequestBuilder

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SampledHttpRequestBuilder

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for SampledHttpRequestBuilder

source§

fn default() -> SampledHttpRequestBuilder

Returns the “default value” for a type. Read more
source§

impl PartialEq for SampledHttpRequestBuilder

source§

fn eq(&self, other: &SampledHttpRequestBuilder) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for SampledHttpRequestBuilder

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more