/* * 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 headers to inspect in a web request. *
*
* You must specify exactly one setting: either All
, IncludedHeaders
, or
* ExcludedHeaders
.
*
* Example JSON: "MatchPattern": { "ExcludedHeaders": [ "KeyToExclude1", "KeyToExclude2" ] }
*
* Inspect all headers. *
*/ private All all; /** ** Inspect only the headers that have a key that matches one of the strings specified here. *
*/ private java.util.List* Inspect only the headers whose keys don't match any of the strings specified here. *
*/ private java.util.List* Inspect all headers. *
* * @param all * Inspect all headers. */ public void setAll(All all) { this.all = all; } /** ** Inspect all headers. *
* * @return Inspect all headers. */ public All getAll() { return this.all; } /** ** Inspect all headers. *
* * @param all * Inspect all headers. * @return Returns a reference to this object so that method calls can be chained together. */ public HeaderMatchPattern withAll(All all) { setAll(all); return this; } /** ** Inspect only the headers that have a key that matches one of the strings specified here. *
* * @return Inspect only the headers that have a key that matches one of the strings specified here. */ public java.util.List* Inspect only the headers that have a key that matches one of the strings specified here. *
* * @param includedHeaders * Inspect only the headers that have a key that matches one of the strings specified here. */ public void setIncludedHeaders(java.util.Collection* Inspect only the headers 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 #setIncludedHeaders(java.util.Collection)} or {@link #withIncludedHeaders(java.util.Collection)} if you * want to override the existing values. *
* * @param includedHeaders * Inspect only the headers 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 HeaderMatchPattern withIncludedHeaders(String... includedHeaders) { if (this.includedHeaders == null) { setIncludedHeaders(new java.util.ArrayList* Inspect only the headers that have a key that matches one of the strings specified here. *
* * @param includedHeaders * Inspect only the headers 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 HeaderMatchPattern withIncludedHeaders(java.util.Collection* Inspect only the headers whose keys don't match any of the strings specified here. *
* * @return Inspect only the headers whose keys don't match any of the strings specified here. */ public java.util.List* Inspect only the headers whose keys don't match any of the strings specified here. *
* * @param excludedHeaders * Inspect only the headers whose keys don't match any of the strings specified here. */ public void setExcludedHeaders(java.util.Collection* Inspect only the headers 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 #setExcludedHeaders(java.util.Collection)} or {@link #withExcludedHeaders(java.util.Collection)} if you * want to override the existing values. *
* * @param excludedHeaders * Inspect only the headers 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 HeaderMatchPattern withExcludedHeaders(String... excludedHeaders) { if (this.excludedHeaders == null) { setExcludedHeaders(new java.util.ArrayList* Inspect only the headers whose keys don't match any of the strings specified here. *
* * @param excludedHeaders * Inspect only the headers 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 HeaderMatchPattern withExcludedHeaders(java.util.Collection