/* * 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; /** *
* Additional information that's used by a managed rule group. Many managed rule groups don't require this. *
** The rule groups used for intelligent threat mitigation require additional configuration: *
*
* Use the AWSManagedRulesACFPRuleSet
configuration object to configure the account creation fraud
* prevention managed rule group. The configuration includes the registration and sign-up pages of your application and
* the locations in the account creation request payload of data, such as the user email and phone number fields.
*
* Use the AWSManagedRulesATPRuleSet
configuration object to configure the account takeover prevention
* managed rule group. The configuration includes the sign-in page of your application and the locations in the login
* request payload of data such as the username and password.
*
* Use the AWSManagedRulesBotControlRuleSet
configuration object to configure the protection level that you
* want the Bot Control rule group to use.
*
* For example specifications, see the examples section of CreateWebACL. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ManagedRuleGroupConfig implements Serializable, Cloneable, StructuredPojo { /** *
* Instead of this setting, provide your configuration under AWSManagedRulesATPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Additional configuration for using the Bot Control managed rule group. Use this to specify the inspection level * that you want to use. For information about using the Bot Control managed rule group, see WAF Bot Control * rule group and WAF Bot * Control in the WAF Developer Guide. *
*/ private AWSManagedRulesBotControlRuleSet aWSManagedRulesBotControlRuleSet; /** *
* Additional configuration for using the account takeover prevention (ATP) managed rule group,
* AWSManagedRulesATPRuleSet
. Use this to provide login request information to the rule group. For web
* ACLs that protect CloudFront distributions, use this to also provide the information about how your distribution
* responds to login requests.
*
* This configuration replaces the individual configuration fields in ManagedRuleGroupConfig
and
* provides additional feature configuration.
*
* For information about using the ATP managed rule group, see WAF Fraud Control * account takeover prevention (ATP) rule group and WAF Fraud Control account takeover * prevention (ATP) in the WAF Developer Guide. *
*/ private AWSManagedRulesATPRuleSet aWSManagedRulesATPRuleSet; /** *
* Additional configuration for using the account creation fraud prevention (ACFP) managed rule group,
* AWSManagedRulesACFPRuleSet
. Use this to provide account creation request information to the rule
* group. For web ACLs that protect CloudFront distributions, use this to also provide the information about how
* your distribution responds to account creation requests.
*
* For information about using the ACFP managed rule group, see WAF Fraud Control * account creation fraud prevention (ACFP) rule group and WAF Fraud Control account creation * fraud prevention (ACFP) in the WAF Developer Guide. *
*/ private AWSManagedRulesACFPRuleSet aWSManagedRulesACFPRuleSet; /** *
* Instead of this setting, provide your configuration under AWSManagedRulesATPRuleSet
.
*
* Instead of this setting, provide your configuration under AWSManagedRulesATPRuleSet
.
*
* Instead of this setting, provide your configuration under AWSManagedRulesATPRuleSet
.
*
* Instead of this setting, provide your configuration under AWSManagedRulesATPRuleSet
.
*
* Instead of this setting, provide your configuration under AWSManagedRulesATPRuleSet
.
*
* Instead of this setting, provide your configuration under AWSManagedRulesATPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Instead of this setting, provide your configuration under the request inspection configuration for
* AWSManagedRulesATPRuleSet
or AWSManagedRulesACFPRuleSet
.
*
* Additional configuration for using the Bot Control managed rule group. Use this to specify the inspection level * that you want to use. For information about using the Bot Control managed rule group, see WAF Bot Control * rule group and WAF Bot * Control in the WAF Developer Guide. *
* * @param aWSManagedRulesBotControlRuleSet * Additional configuration for using the Bot Control managed rule group. Use this to specify the inspection * level that you want to use. For information about using the Bot Control managed rule group, see WAF Bot * Control rule group and WAF Bot Control in * the WAF Developer Guide. */ public void setAWSManagedRulesBotControlRuleSet(AWSManagedRulesBotControlRuleSet aWSManagedRulesBotControlRuleSet) { this.aWSManagedRulesBotControlRuleSet = aWSManagedRulesBotControlRuleSet; } /** ** Additional configuration for using the Bot Control managed rule group. Use this to specify the inspection level * that you want to use. For information about using the Bot Control managed rule group, see WAF Bot Control * rule group and WAF Bot * Control in the WAF Developer Guide. *
* * @return Additional configuration for using the Bot Control managed rule group. Use this to specify the inspection * level that you want to use. For information about using the Bot Control managed rule group, see WAF Bot * Control rule group and WAF Bot Control in * the WAF Developer Guide. */ public AWSManagedRulesBotControlRuleSet getAWSManagedRulesBotControlRuleSet() { return this.aWSManagedRulesBotControlRuleSet; } /** ** Additional configuration for using the Bot Control managed rule group. Use this to specify the inspection level * that you want to use. For information about using the Bot Control managed rule group, see WAF Bot Control * rule group and WAF Bot * Control in the WAF Developer Guide. *
* * @param aWSManagedRulesBotControlRuleSet * Additional configuration for using the Bot Control managed rule group. Use this to specify the inspection * level that you want to use. For information about using the Bot Control managed rule group, see WAF Bot * Control rule group and WAF Bot Control in * the WAF Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public ManagedRuleGroupConfig withAWSManagedRulesBotControlRuleSet(AWSManagedRulesBotControlRuleSet aWSManagedRulesBotControlRuleSet) { setAWSManagedRulesBotControlRuleSet(aWSManagedRulesBotControlRuleSet); return this; } /** *
* Additional configuration for using the account takeover prevention (ATP) managed rule group,
* AWSManagedRulesATPRuleSet
. Use this to provide login request information to the rule group. For web
* ACLs that protect CloudFront distributions, use this to also provide the information about how your distribution
* responds to login requests.
*
* This configuration replaces the individual configuration fields in ManagedRuleGroupConfig
and
* provides additional feature configuration.
*
* For information about using the ATP managed rule group, see WAF Fraud Control * account takeover prevention (ATP) rule group and WAF Fraud Control account takeover * prevention (ATP) in the WAF Developer Guide. *
* * @param aWSManagedRulesATPRuleSet * Additional configuration for using the account takeover prevention (ATP) managed rule group, *AWSManagedRulesATPRuleSet
. Use this to provide login request information to the rule group.
* For web ACLs that protect CloudFront distributions, use this to also provide the information about how
* your distribution responds to login requests.
*
* This configuration replaces the individual configuration fields in ManagedRuleGroupConfig
and
* provides additional feature configuration.
*
* For information about using the ATP managed rule group, see WAF Fraud * Control account takeover prevention (ATP) rule group and WAF Fraud Control account * takeover prevention (ATP) in the WAF Developer Guide. */ public void setAWSManagedRulesATPRuleSet(AWSManagedRulesATPRuleSet aWSManagedRulesATPRuleSet) { this.aWSManagedRulesATPRuleSet = aWSManagedRulesATPRuleSet; } /** *
* Additional configuration for using the account takeover prevention (ATP) managed rule group,
* AWSManagedRulesATPRuleSet
. Use this to provide login request information to the rule group. For web
* ACLs that protect CloudFront distributions, use this to also provide the information about how your distribution
* responds to login requests.
*
* This configuration replaces the individual configuration fields in ManagedRuleGroupConfig
and
* provides additional feature configuration.
*
* For information about using the ATP managed rule group, see WAF Fraud Control * account takeover prevention (ATP) rule group and WAF Fraud Control account takeover * prevention (ATP) in the WAF Developer Guide. *
* * @return Additional configuration for using the account takeover prevention (ATP) managed rule group, *AWSManagedRulesATPRuleSet
. Use this to provide login request information to the rule group.
* For web ACLs that protect CloudFront distributions, use this to also provide the information about how
* your distribution responds to login requests.
*
* This configuration replaces the individual configuration fields in ManagedRuleGroupConfig
* and provides additional feature configuration.
*
* For information about using the ATP managed rule group, see WAF Fraud * Control account takeover prevention (ATP) rule group and WAF Fraud Control account * takeover prevention (ATP) in the WAF Developer Guide. */ public AWSManagedRulesATPRuleSet getAWSManagedRulesATPRuleSet() { return this.aWSManagedRulesATPRuleSet; } /** *
* Additional configuration for using the account takeover prevention (ATP) managed rule group,
* AWSManagedRulesATPRuleSet
. Use this to provide login request information to the rule group. For web
* ACLs that protect CloudFront distributions, use this to also provide the information about how your distribution
* responds to login requests.
*
* This configuration replaces the individual configuration fields in ManagedRuleGroupConfig
and
* provides additional feature configuration.
*
* For information about using the ATP managed rule group, see WAF Fraud Control * account takeover prevention (ATP) rule group and WAF Fraud Control account takeover * prevention (ATP) in the WAF Developer Guide. *
* * @param aWSManagedRulesATPRuleSet * Additional configuration for using the account takeover prevention (ATP) managed rule group, *AWSManagedRulesATPRuleSet
. Use this to provide login request information to the rule group.
* For web ACLs that protect CloudFront distributions, use this to also provide the information about how
* your distribution responds to login requests.
*
* This configuration replaces the individual configuration fields in ManagedRuleGroupConfig
and
* provides additional feature configuration.
*
* For information about using the ATP managed rule group, see WAF Fraud * Control account takeover prevention (ATP) rule group and WAF Fraud Control account * takeover prevention (ATP) in the WAF Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public ManagedRuleGroupConfig withAWSManagedRulesATPRuleSet(AWSManagedRulesATPRuleSet aWSManagedRulesATPRuleSet) { setAWSManagedRulesATPRuleSet(aWSManagedRulesATPRuleSet); return this; } /** *
* Additional configuration for using the account creation fraud prevention (ACFP) managed rule group,
* AWSManagedRulesACFPRuleSet
. Use this to provide account creation request information to the rule
* group. For web ACLs that protect CloudFront distributions, use this to also provide the information about how
* your distribution responds to account creation requests.
*
* For information about using the ACFP managed rule group, see WAF Fraud Control * account creation fraud prevention (ACFP) rule group and WAF Fraud Control account creation * fraud prevention (ACFP) in the WAF Developer Guide. *
* * @param aWSManagedRulesACFPRuleSet * Additional configuration for using the account creation fraud prevention (ACFP) managed rule group, *AWSManagedRulesACFPRuleSet
. Use this to provide account creation request information to the
* rule group. For web ACLs that protect CloudFront distributions, use this to also provide the information
* about how your distribution responds to account creation requests.
* * For information about using the ACFP managed rule group, see WAF Fraud * Control account creation fraud prevention (ACFP) rule group and WAF Fraud Control account * creation fraud prevention (ACFP) in the WAF Developer Guide. */ public void setAWSManagedRulesACFPRuleSet(AWSManagedRulesACFPRuleSet aWSManagedRulesACFPRuleSet) { this.aWSManagedRulesACFPRuleSet = aWSManagedRulesACFPRuleSet; } /** *
* Additional configuration for using the account creation fraud prevention (ACFP) managed rule group,
* AWSManagedRulesACFPRuleSet
. Use this to provide account creation request information to the rule
* group. For web ACLs that protect CloudFront distributions, use this to also provide the information about how
* your distribution responds to account creation requests.
*
* For information about using the ACFP managed rule group, see WAF Fraud Control * account creation fraud prevention (ACFP) rule group and WAF Fraud Control account creation * fraud prevention (ACFP) in the WAF Developer Guide. *
* * @return Additional configuration for using the account creation fraud prevention (ACFP) managed rule group, *AWSManagedRulesACFPRuleSet
. Use this to provide account creation request information to the
* rule group. For web ACLs that protect CloudFront distributions, use this to also provide the information
* about how your distribution responds to account creation requests.
* * For information about using the ACFP managed rule group, see WAF Fraud * Control account creation fraud prevention (ACFP) rule group and WAF Fraud Control account * creation fraud prevention (ACFP) in the WAF Developer Guide. */ public AWSManagedRulesACFPRuleSet getAWSManagedRulesACFPRuleSet() { return this.aWSManagedRulesACFPRuleSet; } /** *
* Additional configuration for using the account creation fraud prevention (ACFP) managed rule group,
* AWSManagedRulesACFPRuleSet
. Use this to provide account creation request information to the rule
* group. For web ACLs that protect CloudFront distributions, use this to also provide the information about how
* your distribution responds to account creation requests.
*
* For information about using the ACFP managed rule group, see WAF Fraud Control * account creation fraud prevention (ACFP) rule group and WAF Fraud Control account creation * fraud prevention (ACFP) in the WAF Developer Guide. *
* * @param aWSManagedRulesACFPRuleSet * Additional configuration for using the account creation fraud prevention (ACFP) managed rule group, *AWSManagedRulesACFPRuleSet
. Use this to provide account creation request information to the
* rule group. For web ACLs that protect CloudFront distributions, use this to also provide the information
* about how your distribution responds to account creation requests.
* * For information about using the ACFP managed rule group, see WAF Fraud * Control account creation fraud prevention (ACFP) rule group and WAF Fraud Control account * creation fraud prevention (ACFP) in the WAF Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public ManagedRuleGroupConfig withAWSManagedRulesACFPRuleSet(AWSManagedRulesACFPRuleSet aWSManagedRulesACFPRuleSet) { setAWSManagedRulesACFPRuleSet(aWSManagedRulesACFPRuleSet); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getLoginPath() != null) sb.append("LoginPath: ").append(getLoginPath()).append(","); if (getPayloadType() != null) sb.append("PayloadType: ").append(getPayloadType()).append(","); if (getUsernameField() != null) sb.append("UsernameField: ").append(getUsernameField()).append(","); if (getPasswordField() != null) sb.append("PasswordField: ").append(getPasswordField()).append(","); if (getAWSManagedRulesBotControlRuleSet() != null) sb.append("AWSManagedRulesBotControlRuleSet: ").append(getAWSManagedRulesBotControlRuleSet()).append(","); if (getAWSManagedRulesATPRuleSet() != null) sb.append("AWSManagedRulesATPRuleSet: ").append(getAWSManagedRulesATPRuleSet()).append(","); if (getAWSManagedRulesACFPRuleSet() != null) sb.append("AWSManagedRulesACFPRuleSet: ").append(getAWSManagedRulesACFPRuleSet()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ManagedRuleGroupConfig == false) return false; ManagedRuleGroupConfig other = (ManagedRuleGroupConfig) obj; if (other.getLoginPath() == null ^ this.getLoginPath() == null) return false; if (other.getLoginPath() != null && other.getLoginPath().equals(this.getLoginPath()) == false) return false; if (other.getPayloadType() == null ^ this.getPayloadType() == null) return false; if (other.getPayloadType() != null && other.getPayloadType().equals(this.getPayloadType()) == false) return false; if (other.getUsernameField() == null ^ this.getUsernameField() == null) return false; if (other.getUsernameField() != null && other.getUsernameField().equals(this.getUsernameField()) == false) return false; if (other.getPasswordField() == null ^ this.getPasswordField() == null) return false; if (other.getPasswordField() != null && other.getPasswordField().equals(this.getPasswordField()) == false) return false; if (other.getAWSManagedRulesBotControlRuleSet() == null ^ this.getAWSManagedRulesBotControlRuleSet() == null) return false; if (other.getAWSManagedRulesBotControlRuleSet() != null && other.getAWSManagedRulesBotControlRuleSet().equals(this.getAWSManagedRulesBotControlRuleSet()) == false) return false; if (other.getAWSManagedRulesATPRuleSet() == null ^ this.getAWSManagedRulesATPRuleSet() == null) return false; if (other.getAWSManagedRulesATPRuleSet() != null && other.getAWSManagedRulesATPRuleSet().equals(this.getAWSManagedRulesATPRuleSet()) == false) return false; if (other.getAWSManagedRulesACFPRuleSet() == null ^ this.getAWSManagedRulesACFPRuleSet() == null) return false; if (other.getAWSManagedRulesACFPRuleSet() != null && other.getAWSManagedRulesACFPRuleSet().equals(this.getAWSManagedRulesACFPRuleSet()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLoginPath() == null) ? 0 : getLoginPath().hashCode()); hashCode = prime * hashCode + ((getPayloadType() == null) ? 0 : getPayloadType().hashCode()); hashCode = prime * hashCode + ((getUsernameField() == null) ? 0 : getUsernameField().hashCode()); hashCode = prime * hashCode + ((getPasswordField() == null) ? 0 : getPasswordField().hashCode()); hashCode = prime * hashCode + ((getAWSManagedRulesBotControlRuleSet() == null) ? 0 : getAWSManagedRulesBotControlRuleSet().hashCode()); hashCode = prime * hashCode + ((getAWSManagedRulesATPRuleSet() == null) ? 0 : getAWSManagedRulesATPRuleSet().hashCode()); hashCode = prime * hashCode + ((getAWSManagedRulesACFPRuleSet() == null) ? 0 : getAWSManagedRulesACFPRuleSet().hashCode()); return hashCode; } @Override public ManagedRuleGroupConfig clone() { try { return (ManagedRuleGroupConfig) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.wafv2.model.transform.ManagedRuleGroupConfigMarshaller.getInstance().marshall(this, protocolMarshaller); } }