/* * 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 status code. This is part of the ResponseInspection
configuration
* for AWSManagedRulesATPRuleSet
and AWSManagedRulesACFPRuleSet
.
*
* Response inspection is available only in web ACLs that protect Amazon CloudFront distributions. *
** Status codes in the response that indicate a successful login or account creation attempt. To be counted as a * success, the response status code must match one of these. Each code must be unique among the success and failure * status codes. *
*
* JSON example: "SuccessCodes": [ 200, 201 ]
*
* Status codes in the response that indicate a failed login or account creation attempt. To be counted as a * failure, the response status code must match one of these. Each code must be unique among the success and failure * status codes. *
*
* JSON example: "FailureCodes": [ 400, 404 ]
*
* Status codes in the response that indicate a successful login or account creation attempt. To be counted as a * success, the response status code must match one of these. Each code must be unique among the success and failure * status codes. *
*
* JSON example: "SuccessCodes": [ 200, 201 ]
*
* JSON example:
* Status codes in the response that indicate a successful login or account creation attempt. To be counted as a
* success, the response status code must match one of these. Each code must be unique among the success and failure
* status codes.
*
* JSON example: "SuccessCodes": [ 200, 201 ]
*/
public java.util.List"SuccessCodes": [ 200, 201 ]
*
* JSON example:
* Status codes in the response that indicate a successful login or account creation attempt. To be counted as a
* success, the response status code must match one of these. Each code must be unique among the success and failure
* status codes.
*
* JSON example:
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSuccessCodes(java.util.Collection)} or {@link #withSuccessCodes(java.util.Collection)} if you want to
* override the existing values.
* "SuccessCodes": [ 200, 201 ]
*/
public void setSuccessCodes(java.util.Collection"SuccessCodes": [ 200, 201 ]
*
* JSON example:
* Status codes in the response that indicate a successful login or account creation attempt. To be counted as a
* success, the response status code must match one of these. Each code must be unique among the success and failure
* status codes.
*
* JSON example: "SuccessCodes": [ 200, 201 ]
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ResponseInspectionStatusCode withSuccessCodes(Integer... successCodes) {
if (this.successCodes == null) {
setSuccessCodes(new java.util.ArrayList"SuccessCodes": [ 200, 201 ]
*
* JSON example:
* Status codes in the response that indicate a failed login or account creation attempt. To be counted as a
* failure, the response status code must match one of these. Each code must be unique among the success and failure
* status codes.
*
* JSON example: "SuccessCodes": [ 200, 201 ]
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ResponseInspectionStatusCode withSuccessCodes(java.util.Collection"FailureCodes": [ 400, 404 ]
*
* JSON example:
* Status codes in the response that indicate a failed login or account creation attempt. To be counted as a
* failure, the response status code must match one of these. Each code must be unique among the success and failure
* status codes.
*
* JSON example: "FailureCodes": [ 400, 404 ]
*/
public java.util.List"FailureCodes": [ 400, 404 ]
*
* JSON example:
* Status codes in the response that indicate a failed login or account creation attempt. To be counted as a
* failure, the response status code must match one of these. Each code must be unique among the success and failure
* status codes.
*
* JSON example:
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setFailureCodes(java.util.Collection)} or {@link #withFailureCodes(java.util.Collection)} if you want to
* override the existing values.
* "FailureCodes": [ 400, 404 ]
*/
public void setFailureCodes(java.util.Collection"FailureCodes": [ 400, 404 ]
*
* JSON example:
* Status codes in the response that indicate a failed login or account creation attempt. To be counted as a
* failure, the response status code must match one of these. Each code must be unique among the success and failure
* status codes.
*
* JSON example: "FailureCodes": [ 400, 404 ]
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ResponseInspectionStatusCode withFailureCodes(Integer... failureCodes) {
if (this.failureCodes == null) {
setFailureCodes(new java.util.ArrayList"FailureCodes": [ 400, 404 ]
*
* JSON example: "FailureCodes": [ 400, 404 ]
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ResponseInspectionStatusCode withFailureCodes(java.util.Collection