All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.wafv2.model.Cookies Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS WAFV2 module holds the client classes that are used for communicating with AWS WAFV2 Service

There is a newer version: 1.12.767
Show newest version
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.wafv2.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Inspect the cookies in the web request. You can specify the parts of the cookies to inspect and you can narrow the * set of cookies to inspect by including or excluding specific keys. *

*

* This is used to indicate the web request component to inspect, in the FieldToMatch specification. *

*

* Example JSON: * "Cookies": { "MatchPattern": { "All": {} }, "MatchScope": "KEY", "OversizeHandling": "MATCH" } *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Cookies implements Serializable, Cloneable, StructuredPojo { /** *

* The filter to use to identify the subset of cookies to inspect in a web request. *

*

* You must specify exactly one setting: either All, IncludedCookies, or * ExcludedCookies. *

*

* Example JSON: "MatchPattern": { "IncludedCookies": [ "session-id-time", "session-id" ] } *

*/ private CookieMatchPattern matchPattern; /** *

* The parts of the cookies to inspect with the rule inspection criteria. If you specify ALL, WAF * inspects both keys and values. *

*

* All does not require a match to be found in the keys and a match to be found in the values. It * requires a match to be found in the keys or the values or both. To require a match in the keys and in the values, * use a logical AND statement to combine two match rules, one that inspects the keys and another that * inspects the values. *

*/ private String matchScope; /** *

* What WAF should do if the cookies of the request are more numerous or larger than WAF can inspect. WAF does not * support inspecting the entire contents of request cookies when they exceed 8 KB (8192 bytes) or 200 total * cookies. The underlying host service forwards a maximum of 200 cookies and at most 8 KB of cookie contents to * WAF. *

*

* The options for oversize handling are the following: *

*
    *
  • *

    * CONTINUE - Inspect the available cookies normally, according to the rule inspection criteria. *

    *
  • *
  • *

    * MATCH - Treat the web request as matching the rule statement. WAF applies the rule action to the * request. *

    *
  • *
  • *

    * NO_MATCH - Treat the web request as not matching the rule statement. *

    *
  • *
*/ private String oversizeHandling; /** *

* The filter to use to identify the subset of cookies to inspect in a web request. *

*

* You must specify exactly one setting: either All, IncludedCookies, or * ExcludedCookies. *

*

* Example JSON: "MatchPattern": { "IncludedCookies": [ "session-id-time", "session-id" ] } *

* * @param matchPattern * The filter to use to identify the subset of cookies to inspect in a web request.

*

* You must specify exactly one setting: either All, IncludedCookies, or * ExcludedCookies. *

*

* Example JSON: "MatchPattern": { "IncludedCookies": [ "session-id-time", "session-id" ] } */ public void setMatchPattern(CookieMatchPattern matchPattern) { this.matchPattern = matchPattern; } /** *

* The filter to use to identify the subset of cookies to inspect in a web request. *

*

* You must specify exactly one setting: either All, IncludedCookies, or * ExcludedCookies. *

*

* Example JSON: "MatchPattern": { "IncludedCookies": [ "session-id-time", "session-id" ] } *

* * @return The filter to use to identify the subset of cookies to inspect in a web request.

*

* You must specify exactly one setting: either All, IncludedCookies, or * ExcludedCookies. *

*

* Example JSON: "MatchPattern": { "IncludedCookies": [ "session-id-time", "session-id" ] } */ public CookieMatchPattern getMatchPattern() { return this.matchPattern; } /** *

* The filter to use to identify the subset of cookies to inspect in a web request. *

*

* You must specify exactly one setting: either All, IncludedCookies, or * ExcludedCookies. *

*

* Example JSON: "MatchPattern": { "IncludedCookies": [ "session-id-time", "session-id" ] } *

* * @param matchPattern * The filter to use to identify the subset of cookies to inspect in a web request.

*

* You must specify exactly one setting: either All, IncludedCookies, or * ExcludedCookies. *

*

* Example JSON: "MatchPattern": { "IncludedCookies": [ "session-id-time", "session-id" ] } * @return Returns a reference to this object so that method calls can be chained together. */ public Cookies withMatchPattern(CookieMatchPattern matchPattern) { setMatchPattern(matchPattern); return this; } /** *

* The parts of the cookies to inspect with the rule inspection criteria. If you specify ALL, WAF * inspects both keys and values. *

*

* All does not require a match to be found in the keys and a match to be found in the values. It * requires a match to be found in the keys or the values or both. To require a match in the keys and in the values, * use a logical AND statement to combine two match rules, one that inspects the keys and another that * inspects the values. *

* * @param matchScope * The parts of the cookies to inspect with the rule inspection criteria. If you specify ALL, * WAF inspects both keys and values.

*

* All does not require a match to be found in the keys and a match to be found in the values. * It requires a match to be found in the keys or the values or both. To require a match in the keys and in * the values, use a logical AND statement to combine two match rules, one that inspects the * keys and another that inspects the values. * @see MapMatchScope */ public void setMatchScope(String matchScope) { this.matchScope = matchScope; } /** *

* The parts of the cookies to inspect with the rule inspection criteria. If you specify ALL, WAF * inspects both keys and values. *

*

* All does not require a match to be found in the keys and a match to be found in the values. It * requires a match to be found in the keys or the values or both. To require a match in the keys and in the values, * use a logical AND statement to combine two match rules, one that inspects the keys and another that * inspects the values. *

* * @return The parts of the cookies to inspect with the rule inspection criteria. If you specify ALL, * WAF inspects both keys and values.

*

* All does not require a match to be found in the keys and a match to be found in the values. * It requires a match to be found in the keys or the values or both. To require a match in the keys and in * the values, use a logical AND statement to combine two match rules, one that inspects the * keys and another that inspects the values. * @see MapMatchScope */ public String getMatchScope() { return this.matchScope; } /** *

* The parts of the cookies to inspect with the rule inspection criteria. If you specify ALL, WAF * inspects both keys and values. *

*

* All does not require a match to be found in the keys and a match to be found in the values. It * requires a match to be found in the keys or the values or both. To require a match in the keys and in the values, * use a logical AND statement to combine two match rules, one that inspects the keys and another that * inspects the values. *

* * @param matchScope * The parts of the cookies to inspect with the rule inspection criteria. If you specify ALL, * WAF inspects both keys and values.

*

* All does not require a match to be found in the keys and a match to be found in the values. * It requires a match to be found in the keys or the values or both. To require a match in the keys and in * the values, use a logical AND statement to combine two match rules, one that inspects the * keys and another that inspects the values. * @return Returns a reference to this object so that method calls can be chained together. * @see MapMatchScope */ public Cookies withMatchScope(String matchScope) { setMatchScope(matchScope); return this; } /** *

* The parts of the cookies to inspect with the rule inspection criteria. If you specify ALL, WAF * inspects both keys and values. *

*

* All does not require a match to be found in the keys and a match to be found in the values. It * requires a match to be found in the keys or the values or both. To require a match in the keys and in the values, * use a logical AND statement to combine two match rules, one that inspects the keys and another that * inspects the values. *

* * @param matchScope * The parts of the cookies to inspect with the rule inspection criteria. If you specify ALL, * WAF inspects both keys and values.

*

* All does not require a match to be found in the keys and a match to be found in the values. * It requires a match to be found in the keys or the values or both. To require a match in the keys and in * the values, use a logical AND statement to combine two match rules, one that inspects the * keys and another that inspects the values. * @return Returns a reference to this object so that method calls can be chained together. * @see MapMatchScope */ public Cookies withMatchScope(MapMatchScope matchScope) { this.matchScope = matchScope.toString(); return this; } /** *

* What WAF should do if the cookies of the request are more numerous or larger than WAF can inspect. WAF does not * support inspecting the entire contents of request cookies when they exceed 8 KB (8192 bytes) or 200 total * cookies. The underlying host service forwards a maximum of 200 cookies and at most 8 KB of cookie contents to * WAF. *

*

* The options for oversize handling are the following: *

*
    *
  • *

    * CONTINUE - Inspect the available cookies normally, according to the rule inspection criteria. *

    *
  • *
  • *

    * MATCH - Treat the web request as matching the rule statement. WAF applies the rule action to the * request. *

    *
  • *
  • *

    * NO_MATCH - Treat the web request as not matching the rule statement. *

    *
  • *
* * @param oversizeHandling * What WAF should do if the cookies of the request are more numerous or larger than WAF can inspect. WAF * does not support inspecting the entire contents of request cookies when they exceed 8 KB (8192 bytes) or * 200 total cookies. The underlying host service forwards a maximum of 200 cookies and at most 8 KB of * cookie contents to WAF.

*

* The options for oversize handling are the following: *

*
    *
  • *

    * CONTINUE - Inspect the available cookies normally, according to the rule inspection criteria. *

    *
  • *
  • *

    * MATCH - Treat the web request as matching the rule statement. WAF applies the rule action to * the request. *

    *
  • *
  • *

    * NO_MATCH - Treat the web request as not matching the rule statement. *

    *
  • * @see OversizeHandling */ public void setOversizeHandling(String oversizeHandling) { this.oversizeHandling = oversizeHandling; } /** *

    * What WAF should do if the cookies of the request are more numerous or larger than WAF can inspect. WAF does not * support inspecting the entire contents of request cookies when they exceed 8 KB (8192 bytes) or 200 total * cookies. The underlying host service forwards a maximum of 200 cookies and at most 8 KB of cookie contents to * WAF. *

    *

    * The options for oversize handling are the following: *

    *
      *
    • *

      * CONTINUE - Inspect the available cookies normally, according to the rule inspection criteria. *

      *
    • *
    • *

      * MATCH - Treat the web request as matching the rule statement. WAF applies the rule action to the * request. *

      *
    • *
    • *

      * NO_MATCH - Treat the web request as not matching the rule statement. *

      *
    • *
    * * @return What WAF should do if the cookies of the request are more numerous or larger than WAF can inspect. WAF * does not support inspecting the entire contents of request cookies when they exceed 8 KB (8192 bytes) or * 200 total cookies. The underlying host service forwards a maximum of 200 cookies and at most 8 KB of * cookie contents to WAF.

    *

    * The options for oversize handling are the following: *

    *
      *
    • *

      * CONTINUE - Inspect the available cookies normally, according to the rule inspection * criteria. *

      *
    • *
    • *

      * MATCH - Treat the web request as matching the rule statement. WAF applies the rule action to * the request. *

      *
    • *
    • *

      * NO_MATCH - Treat the web request as not matching the rule statement. *

      *
    • * @see OversizeHandling */ public String getOversizeHandling() { return this.oversizeHandling; } /** *

      * What WAF should do if the cookies of the request are more numerous or larger than WAF can inspect. WAF does not * support inspecting the entire contents of request cookies when they exceed 8 KB (8192 bytes) or 200 total * cookies. The underlying host service forwards a maximum of 200 cookies and at most 8 KB of cookie contents to * WAF. *

      *

      * The options for oversize handling are the following: *

      *
        *
      • *

        * CONTINUE - Inspect the available cookies normally, according to the rule inspection criteria. *

        *
      • *
      • *

        * MATCH - Treat the web request as matching the rule statement. WAF applies the rule action to the * request. *

        *
      • *
      • *

        * NO_MATCH - Treat the web request as not matching the rule statement. *

        *
      • *
      * * @param oversizeHandling * What WAF should do if the cookies of the request are more numerous or larger than WAF can inspect. WAF * does not support inspecting the entire contents of request cookies when they exceed 8 KB (8192 bytes) or * 200 total cookies. The underlying host service forwards a maximum of 200 cookies and at most 8 KB of * cookie contents to WAF.

      *

      * The options for oversize handling are the following: *

      *
        *
      • *

        * CONTINUE - Inspect the available cookies normally, according to the rule inspection criteria. *

        *
      • *
      • *

        * MATCH - Treat the web request as matching the rule statement. WAF applies the rule action to * the request. *

        *
      • *
      • *

        * NO_MATCH - Treat the web request as not matching the rule statement. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see OversizeHandling */ public Cookies withOversizeHandling(String oversizeHandling) { setOversizeHandling(oversizeHandling); return this; } /** *

        * What WAF should do if the cookies of the request are more numerous or larger than WAF can inspect. WAF does not * support inspecting the entire contents of request cookies when they exceed 8 KB (8192 bytes) or 200 total * cookies. The underlying host service forwards a maximum of 200 cookies and at most 8 KB of cookie contents to * WAF. *

        *

        * The options for oversize handling are the following: *

        *
          *
        • *

          * CONTINUE - Inspect the available cookies normally, according to the rule inspection criteria. *

          *
        • *
        • *

          * MATCH - Treat the web request as matching the rule statement. WAF applies the rule action to the * request. *

          *
        • *
        • *

          * NO_MATCH - Treat the web request as not matching the rule statement. *

          *
        • *
        * * @param oversizeHandling * What WAF should do if the cookies of the request are more numerous or larger than WAF can inspect. WAF * does not support inspecting the entire contents of request cookies when they exceed 8 KB (8192 bytes) or * 200 total cookies. The underlying host service forwards a maximum of 200 cookies and at most 8 KB of * cookie contents to WAF.

        *

        * The options for oversize handling are the following: *

        *
          *
        • *

          * CONTINUE - Inspect the available cookies normally, according to the rule inspection criteria. *

          *
        • *
        • *

          * MATCH - Treat the web request as matching the rule statement. WAF applies the rule action to * the request. *

          *
        • *
        • *

          * NO_MATCH - Treat the web request as not matching the rule statement. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see OversizeHandling */ public Cookies withOversizeHandling(OversizeHandling oversizeHandling) { this.oversizeHandling = oversizeHandling.toString(); return this; } /** * 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. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getMatchPattern() != null) sb.append("MatchPattern: ").append(getMatchPattern()).append(","); if (getMatchScope() != null) sb.append("MatchScope: ").append(getMatchScope()).append(","); if (getOversizeHandling() != null) sb.append("OversizeHandling: ").append(getOversizeHandling()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Cookies == false) return false; Cookies other = (Cookies) obj; if (other.getMatchPattern() == null ^ this.getMatchPattern() == null) return false; if (other.getMatchPattern() != null && other.getMatchPattern().equals(this.getMatchPattern()) == false) return false; if (other.getMatchScope() == null ^ this.getMatchScope() == null) return false; if (other.getMatchScope() != null && other.getMatchScope().equals(this.getMatchScope()) == false) return false; if (other.getOversizeHandling() == null ^ this.getOversizeHandling() == null) return false; if (other.getOversizeHandling() != null && other.getOversizeHandling().equals(this.getOversizeHandling()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getMatchPattern() == null) ? 0 : getMatchPattern().hashCode()); hashCode = prime * hashCode + ((getMatchScope() == null) ? 0 : getMatchScope().hashCode()); hashCode = prime * hashCode + ((getOversizeHandling() == null) ? 0 : getOversizeHandling().hashCode()); return hashCode; } @Override public Cookies clone() { try { return (Cookies) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.wafv2.model.transform.CookiesMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy