/* * Copyright 2018-2023 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; /** *
* 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" ] }
*
* Inspect all cookies. *
*/ private All all; /** ** Inspect only the cookies that have a key that matches one of the strings specified here. *
*/ private java.util.List* Inspect only the cookies whose keys don't match any of the strings specified here. *
*/ private java.util.List* Inspect all cookies. *
* * @param all * Inspect all cookies. */ public void setAll(All all) { this.all = all; } /** ** Inspect all cookies. *
* * @return Inspect all cookies. */ public All getAll() { return this.all; } /** ** Inspect all cookies. *
* * @param all * Inspect all cookies. * @return Returns a reference to this object so that method calls can be chained together. */ public CookieMatchPattern withAll(All all) { setAll(all); return this; } /** ** Inspect only the cookies that have a key that matches one of the strings specified here. *
* * @return Inspect only the cookies that have a key that matches one of the strings specified here. */ public java.util.List* Inspect only the cookies that have a key that matches one of the strings specified here. *
* * @param includedCookies * Inspect only the cookies that have a key that matches one of the strings specified here. */ public void setIncludedCookies(java.util.Collection* Inspect only the cookies that have a key that matches one of the strings specified here. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setIncludedCookies(java.util.Collection)} or {@link #withIncludedCookies(java.util.Collection)} if you * want to override the existing values. *
* * @param includedCookies * Inspect only the cookies that have a key that matches one of the strings specified here. * @return Returns a reference to this object so that method calls can be chained together. */ public CookieMatchPattern withIncludedCookies(String... includedCookies) { if (this.includedCookies == null) { setIncludedCookies(new java.util.ArrayList* Inspect only the cookies that have a key that matches one of the strings specified here. *
* * @param includedCookies * Inspect only the cookies that have a key that matches one of the strings specified here. * @return Returns a reference to this object so that method calls can be chained together. */ public CookieMatchPattern withIncludedCookies(java.util.Collection* Inspect only the cookies whose keys don't match any of the strings specified here. *
* * @return Inspect only the cookies whose keys don't match any of the strings specified here. */ public java.util.List* Inspect only the cookies whose keys don't match any of the strings specified here. *
* * @param excludedCookies * Inspect only the cookies whose keys don't match any of the strings specified here. */ public void setExcludedCookies(java.util.Collection* Inspect only the cookies whose keys don't match any of the strings specified here. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setExcludedCookies(java.util.Collection)} or {@link #withExcludedCookies(java.util.Collection)} if you * want to override the existing values. *
* * @param excludedCookies * Inspect only the cookies whose keys don't match any of the strings specified here. * @return Returns a reference to this object so that method calls can be chained together. */ public CookieMatchPattern withExcludedCookies(String... excludedCookies) { if (this.excludedCookies == null) { setExcludedCookies(new java.util.ArrayList* Inspect only the cookies whose keys don't match any of the strings specified here. *
* * @param excludedCookies * Inspect only the cookies whose keys don't match any of the strings specified here. * @return Returns a reference to this object so that method calls can be chained together. */ public CookieMatchPattern withExcludedCookies(java.util.Collection