Class SampledHTTPRequest
- java.lang.Object
-
- software.amazon.awssdk.services.wafv2.model.SampledHTTPRequest
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<SampledHTTPRequest.Builder,SampledHTTPRequest>
@Generated("software.amazon.awssdk:codegen") public final class SampledHTTPRequest extends Object implements SdkPojo, Serializable, ToCopyableBuilder<SampledHTTPRequest.Builder,SampledHTTPRequest>
Represents a single sampled web request. The response from GetSampledRequests includes a
SampledHTTPRequestscomplex type that appears asSampledRequestsin the response syntax.SampledHTTPRequestscontains an array ofSampledHTTPRequestobjects.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSampledHTTPRequest.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringaction()The action that WAF applied to the request.static SampledHTTPRequest.Builderbuilder()CaptchaResponsecaptchaResponse()TheCAPTCHAresponse for the request.ChallengeResponsechallengeResponse()TheChallengeresponse for the request.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()booleanhasLabels()For responses, this returns true if the service returned a value for the Labels property.booleanhasRequestHeadersInserted()For responses, this returns true if the service returned a value for the RequestHeadersInserted property.List<Label>labels()Labels applied to the web request by matching rules.StringoverriddenAction()Used only for rule group rules that have a rule action override in place in the web ACL.HTTPRequestrequest()A complex type that contains detailed information about the request.List<HTTPHeader>requestHeadersInserted()Custom request headers inserted by WAF into the request, according to the custom request configuration for the matching rule action.IntegerresponseCodeSent()The response code that was sent for the request.StringruleNameWithinRuleGroup()The name of theRulethat the request matched.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends SampledHTTPRequest.Builder>serializableBuilderClass()Instanttimestamp()The time at which WAF received the request from your Amazon Web Services resource, in Unix time format (in seconds).SampledHTTPRequest.BuildertoBuilder()StringtoString()Returns a string representation of this object.Longweight()A value that indicates how one result in the response relates proportionally to other results in the response.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
request
public final HTTPRequest request()
A complex type that contains detailed information about the request.
- Returns:
- A complex type that contains detailed information about the request.
-
weight
public final Long weight()
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
2represents roughly twice as many web requests as a result that has a weight of1.- Returns:
- 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
2represents roughly twice as many web requests as a result that has a weight of1.
-
timestamp
public final Instant timestamp()
The time at which WAF received the request from your Amazon Web Services resource, in Unix time format (in seconds).
- Returns:
- The time at which WAF received the request from your Amazon Web Services resource, in Unix time format (in seconds).
-
action
public final String action()
The action that WAF applied to the request.
- Returns:
- The action that WAF applied to the request.
-
ruleNameWithinRuleGroup
public final String ruleNameWithinRuleGroup()
The name of the
Rulethat the request matched. For managed rule groups, the format for this name is<vendor name>#<managed rule group name>#<rule name>. For your own rule groups, the format for this name is<rule group name>#<rule name>. If the rule is not in a rule group, this field is absent.- Returns:
- The name of the
Rulethat the request matched. For managed rule groups, the format for this name is<vendor name>#<managed rule group name>#<rule name>. For your own rule groups, the format for this name is<rule group name>#<rule name>. If the rule is not in a rule group, this field is absent.
-
hasRequestHeadersInserted
public final boolean hasRequestHeadersInserted()
For responses, this returns true if the service returned a value for the RequestHeadersInserted property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
requestHeadersInserted
public final List<HTTPHeader> requestHeadersInserted()
Custom request headers inserted by WAF into the request, according to the custom request configuration for the matching rule action.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasRequestHeadersInserted()method.- Returns:
- Custom request headers inserted by WAF into the request, according to the custom request configuration for the matching rule action.
-
responseCodeSent
public final Integer responseCodeSent()
The response code that was sent for the request.
- Returns:
- The response code that was sent for the request.
-
hasLabels
public final boolean hasLabels()
For responses, this returns true if the service returned a value for the Labels property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
labels
public final List<Label> 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:labelNameAorawswaf:managed:aws:managed-rule-set:header:encoding:utf8.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasLabels()method.- Returns:
- 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:labelNameAorawswaf:managed:aws:managed-rule-set:header:encoding:utf8.
-
captchaResponse
public final CaptchaResponse captchaResponse()
The
CAPTCHAresponse for the request.- Returns:
- The
CAPTCHAresponse for the request.
-
challengeResponse
public final ChallengeResponse challengeResponse()
The
Challengeresponse for the request.- Returns:
- The
Challengeresponse for the request.
-
overriddenAction
public final String overriddenAction()
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
Actionvalue.- Returns:
- 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
Actionvalue.
-
toBuilder
public SampledHTTPRequest.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<SampledHTTPRequest.Builder,SampledHTTPRequest>
-
builder
public static SampledHTTPRequest.Builder builder()
-
serializableBuilderClass
public static Class<? extends SampledHTTPRequest.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-