/* * 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 JSON. WAF can inspect the first 65,536 bytes (64 KB) of the response JSON. 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 identifier for the value to match against in the JSON. The identifier must be an exact match, including case. *
*
* JSON examples: "Identifier": [ "/login/success" ]
and
* "Identifier": [ "/sign-up/success" ]
*
* Values for the specified identifier in the response JSON 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 example: "SuccessValues": [ "True", "Succeeded" ]
*
* Values for the specified identifier in the response JSON 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 example: "FailureValues": [ "False", "Failed" ]
*
* The identifier for the value to match against in the JSON. The identifier must be an exact match, including case. *
*
* JSON examples: "Identifier": [ "/login/success" ]
and
* "Identifier": [ "/sign-up/success" ]
*
* JSON examples: "Identifier": [ "/login/success" ]
and
* "Identifier": [ "/sign-up/success" ]
*/
public void setIdentifier(String identifier) {
this.identifier = identifier;
}
/**
*
* The identifier for the value to match against in the JSON. The identifier must be an exact match, including case. *
*
* JSON examples: "Identifier": [ "/login/success" ]
and
* "Identifier": [ "/sign-up/success" ]
*
* JSON examples: "Identifier": [ "/login/success" ]
and
* "Identifier": [ "/sign-up/success" ]
*/
public String getIdentifier() {
return this.identifier;
}
/**
*
* The identifier for the value to match against in the JSON. The identifier must be an exact match, including case. *
*
* JSON examples: "Identifier": [ "/login/success" ]
and
* "Identifier": [ "/sign-up/success" ]
*
* JSON examples: "Identifier": [ "/login/success" ]
and
* "Identifier": [ "/sign-up/success" ]
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ResponseInspectionJson withIdentifier(String identifier) {
setIdentifier(identifier);
return this;
}
/**
*
* Values for the specified identifier in the response JSON 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 example: "SuccessValues": [ "True", "Succeeded" ]
*
* JSON example:
* Values for the specified identifier in the response JSON 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 example: "SuccessValues": [ "True", "Succeeded" ]
*/
public java.util.List"SuccessValues": [ "True", "Succeeded" ]
*
* JSON example:
* Values for the specified identifier in the response JSON 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 example:
* 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": [ "True", "Succeeded" ]
*/
public void setSuccessValues(java.util.Collection"SuccessValues": [ "True", "Succeeded" ]
*
* JSON example:
* Values for the specified identifier in the response JSON 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 example: "SuccessValues": [ "True", "Succeeded" ]
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ResponseInspectionJson withSuccessValues(String... successValues) {
if (this.successValues == null) {
setSuccessValues(new java.util.ArrayList"SuccessValues": [ "True", "Succeeded" ]
*
* JSON example:
* Values for the specified identifier in the response JSON 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 example: "SuccessValues": [ "True", "Succeeded" ]
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ResponseInspectionJson withSuccessValues(java.util.Collection"FailureValues": [ "False", "Failed" ]
*
* JSON example:
* Values for the specified identifier in the response JSON 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 example: "FailureValues": [ "False", "Failed" ]
*/
public java.util.List"FailureValues": [ "False", "Failed" ]
*
* JSON example:
* Values for the specified identifier in the response JSON 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 example:
* 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": [ "False", "Failed" ]
*/
public void setFailureValues(java.util.Collection"FailureValues": [ "False", "Failed" ]
*
* JSON example:
* Values for the specified identifier in the response JSON 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 example: "FailureValues": [ "False", "Failed" ]
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ResponseInspectionJson withFailureValues(String... failureValues) {
if (this.failureValues == null) {
setFailureValues(new java.util.ArrayList"FailureValues": [ "False", "Failed" ]
*
* JSON example: "FailureValues": [ "False", "Failed" ]
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ResponseInspectionJson withFailureValues(java.util.Collection