/* * 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; /** *
* Configures inspection of the response header. This is part of the ResponseInspection
configuration for
* AWSManagedRulesATPRuleSet
and AWSManagedRulesACFPRuleSet
.
*
* Response inspection is available only in web ACLs that protect Amazon CloudFront distributions. *
** The name of the header to match against. The name must be an exact match, including case. *
*
* JSON example: "Name": [ "RequestResult" ]
*
* Values in the response header with the specified name that indicate a successful login or account creation * attempt. To be counted as a success, the value must be an exact match, including case. Each value must be unique * among the success and failure values. *
*
* JSON examples: "SuccessValues": [ "LoginPassed", "Successful login" ]
and
* "SuccessValues": [ "AccountCreated", "Successful account creation" ]
*
* Values in the response header with the specified name that indicate a failed login or account creation attempt. * To be counted as a failure, the value must be an exact match, including case. Each value must be unique among the * success and failure values. *
*
* JSON examples: "FailureValues": [ "LoginFailed", "Failed login" ]
and
* "FailureValues": [ "AccountCreationFailed" ]
*
* The name of the header to match against. The name must be an exact match, including case. *
*
* JSON example: "Name": [ "RequestResult" ]
*
* JSON example: "Name": [ "RequestResult" ]
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the header to match against. The name must be an exact match, including case. *
*
* JSON example: "Name": [ "RequestResult" ]
*
* JSON example: "Name": [ "RequestResult" ]
*/
public String getName() {
return this.name;
}
/**
*
* The name of the header to match against. The name must be an exact match, including case. *
*
* JSON example: "Name": [ "RequestResult" ]
*
* JSON example: "Name": [ "RequestResult" ]
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ResponseInspectionHeader withName(String name) {
setName(name);
return this;
}
/**
*
* Values in the response header with the specified name that indicate a successful login or account creation * attempt. To be counted as a success, the value must be an exact match, including case. Each value must be unique * among the success and failure values. *
*
* JSON examples: "SuccessValues": [ "LoginPassed", "Successful login" ]
and
* "SuccessValues": [ "AccountCreated", "Successful account creation" ]
*
* JSON examples:
* Values in the response header with the specified name that indicate a successful login or account creation
* attempt. To be counted as a success, the value must be an exact match, including case. Each value must be unique
* among the success and failure values.
*
* JSON examples: "SuccessValues": [ "LoginPassed", "Successful login" ]
and
* "SuccessValues": [ "AccountCreated", "Successful account creation" ]
*/
public java.util.List"SuccessValues": [ "LoginPassed", "Successful login" ]
and
* "SuccessValues": [ "AccountCreated", "Successful account creation" ]
*
* JSON examples:
* Values in the response header with the specified name that indicate a successful login or account creation
* attempt. To be counted as a success, the value must be an exact match, including case. Each value must be unique
* among the success and failure values.
*
* JSON examples:
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSuccessValues(java.util.Collection)} or {@link #withSuccessValues(java.util.Collection)} if you want
* to override the existing values.
* "SuccessValues": [ "LoginPassed", "Successful login" ]
and
* "SuccessValues": [ "AccountCreated", "Successful account creation" ]
*/
public void setSuccessValues(java.util.Collection"SuccessValues": [ "LoginPassed", "Successful login" ]
and
* "SuccessValues": [ "AccountCreated", "Successful account creation" ]
*
* JSON examples:
* Values in the response header with the specified name that indicate a successful login or account creation
* attempt. To be counted as a success, the value must be an exact match, including case. Each value must be unique
* among the success and failure values.
*
* JSON examples: "SuccessValues": [ "LoginPassed", "Successful login" ]
and
* "SuccessValues": [ "AccountCreated", "Successful account creation" ]
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ResponseInspectionHeader withSuccessValues(String... successValues) {
if (this.successValues == null) {
setSuccessValues(new java.util.ArrayList"SuccessValues": [ "LoginPassed", "Successful login" ]
and
* "SuccessValues": [ "AccountCreated", "Successful account creation" ]
*
* JSON examples:
* Values in the response header with the specified name that indicate a failed login or account creation attempt.
* To be counted as a failure, the value must be an exact match, including case. Each value must be unique among the
* success and failure values.
*
* JSON examples: "SuccessValues": [ "LoginPassed", "Successful login" ]
and
* "SuccessValues": [ "AccountCreated", "Successful account creation" ]
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ResponseInspectionHeader withSuccessValues(java.util.Collection"FailureValues": [ "LoginFailed", "Failed login" ]
and
* "FailureValues": [ "AccountCreationFailed" ]
*
* JSON examples:
* Values in the response header with the specified name that indicate a failed login or account creation attempt.
* To be counted as a failure, the value must be an exact match, including case. Each value must be unique among the
* success and failure values.
*
* JSON examples: "FailureValues": [ "LoginFailed", "Failed login" ]
and
* "FailureValues": [ "AccountCreationFailed" ]
*/
public java.util.List"FailureValues": [ "LoginFailed", "Failed login" ]
and
* "FailureValues": [ "AccountCreationFailed" ]
*
* JSON examples:
* Values in the response header with the specified name that indicate a failed login or account creation attempt.
* To be counted as a failure, the value must be an exact match, including case. Each value must be unique among the
* success and failure values.
*
* JSON examples:
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setFailureValues(java.util.Collection)} or {@link #withFailureValues(java.util.Collection)} if you want
* to override the existing values.
* "FailureValues": [ "LoginFailed", "Failed login" ]
and
* "FailureValues": [ "AccountCreationFailed" ]
*/
public void setFailureValues(java.util.Collection"FailureValues": [ "LoginFailed", "Failed login" ]
and
* "FailureValues": [ "AccountCreationFailed" ]
*
* JSON examples:
* Values in the response header with the specified name that indicate a failed login or account creation attempt.
* To be counted as a failure, the value must be an exact match, including case. Each value must be unique among the
* success and failure values.
*
* JSON examples: "FailureValues": [ "LoginFailed", "Failed login" ]
and
* "FailureValues": [ "AccountCreationFailed" ]
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ResponseInspectionHeader withFailureValues(String... failureValues) {
if (this.failureValues == null) {
setFailureValues(new java.util.ArrayList"FailureValues": [ "LoginFailed", "Failed login" ]
and
* "FailureValues": [ "AccountCreationFailed" ]
*
* JSON examples: "FailureValues": [ "LoginFailed", "Failed login" ]
and
* "FailureValues": [ "AccountCreationFailed" ]
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ResponseInspectionHeader withFailureValues(java.util.Collection