All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.wafv2.model.RegexPatternSet Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS WAFV2 module holds the client classes that are used for communicating with AWS WAFV2 Service

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2014-2019 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;

/**
 * 
 * 

* This is the latest version of AWS WAF, named AWS WAFV2, released in November, 2019. For information, including * how to migrate your AWS WAF resources from the prior release, see the AWS WAF Developer Guide. *

*
*

* Contains one or more regular expressions. *

*

* AWS WAF assigns an ARN to each RegexPatternSet that you create. To use a set in a rule, you provide the * ARN to the Rule statement RegexPatternSetReferenceStatement. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RegexPatternSet implements Serializable, Cloneable, StructuredPojo { /** *

* A friendly name of the set. You cannot change the name after you create the set. *

*/ private String name; /** *

* A unique identifier for the set. This ID is returned in the responses to create and list commands. You provide it * to operations like update and delete. *

*/ private String id; /** *

* The Amazon Resource Name (ARN) of the entity. *

*/ private String aRN; /** *

* A friendly description of the set. You cannot change the description of a set after you create it. *

*/ private String description; /** *

* The regular expression patterns in the set. *

*/ private java.util.List regularExpressionList; /** *

* A friendly name of the set. You cannot change the name after you create the set. *

* * @param name * A friendly name of the set. You cannot change the name after you create the set. */ public void setName(String name) { this.name = name; } /** *

* A friendly name of the set. You cannot change the name after you create the set. *

* * @return A friendly name of the set. You cannot change the name after you create the set. */ public String getName() { return this.name; } /** *

* A friendly name of the set. You cannot change the name after you create the set. *

* * @param name * A friendly name of the set. You cannot change the name after you create the set. * @return Returns a reference to this object so that method calls can be chained together. */ public RegexPatternSet withName(String name) { setName(name); return this; } /** *

* A unique identifier for the set. This ID is returned in the responses to create and list commands. You provide it * to operations like update and delete. *

* * @param id * A unique identifier for the set. This ID is returned in the responses to create and list commands. You * provide it to operations like update and delete. */ public void setId(String id) { this.id = id; } /** *

* A unique identifier for the set. This ID is returned in the responses to create and list commands. You provide it * to operations like update and delete. *

* * @return A unique identifier for the set. This ID is returned in the responses to create and list commands. You * provide it to operations like update and delete. */ public String getId() { return this.id; } /** *

* A unique identifier for the set. This ID is returned in the responses to create and list commands. You provide it * to operations like update and delete. *

* * @param id * A unique identifier for the set. This ID is returned in the responses to create and list commands. You * provide it to operations like update and delete. * @return Returns a reference to this object so that method calls can be chained together. */ public RegexPatternSet withId(String id) { setId(id); return this; } /** *

* The Amazon Resource Name (ARN) of the entity. *

* * @param aRN * The Amazon Resource Name (ARN) of the entity. */ public void setARN(String aRN) { this.aRN = aRN; } /** *

* The Amazon Resource Name (ARN) of the entity. *

* * @return The Amazon Resource Name (ARN) of the entity. */ public String getARN() { return this.aRN; } /** *

* The Amazon Resource Name (ARN) of the entity. *

* * @param aRN * The Amazon Resource Name (ARN) of the entity. * @return Returns a reference to this object so that method calls can be chained together. */ public RegexPatternSet withARN(String aRN) { setARN(aRN); return this; } /** *

* A friendly description of the set. You cannot change the description of a set after you create it. *

* * @param description * A friendly description of the set. You cannot change the description of a set after you create it. */ public void setDescription(String description) { this.description = description; } /** *

* A friendly description of the set. You cannot change the description of a set after you create it. *

* * @return A friendly description of the set. You cannot change the description of a set after you create it. */ public String getDescription() { return this.description; } /** *

* A friendly description of the set. You cannot change the description of a set after you create it. *

* * @param description * A friendly description of the set. You cannot change the description of a set after you create it. * @return Returns a reference to this object so that method calls can be chained together. */ public RegexPatternSet withDescription(String description) { setDescription(description); return this; } /** *

* The regular expression patterns in the set. *

* * @return The regular expression patterns in the set. */ public java.util.List getRegularExpressionList() { return regularExpressionList; } /** *

* The regular expression patterns in the set. *

* * @param regularExpressionList * The regular expression patterns in the set. */ public void setRegularExpressionList(java.util.Collection regularExpressionList) { if (regularExpressionList == null) { this.regularExpressionList = null; return; } this.regularExpressionList = new java.util.ArrayList(regularExpressionList); } /** *

* The regular expression patterns in the set. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setRegularExpressionList(java.util.Collection)} or * {@link #withRegularExpressionList(java.util.Collection)} if you want to override the existing values. *

* * @param regularExpressionList * The regular expression patterns in the set. * @return Returns a reference to this object so that method calls can be chained together. */ public RegexPatternSet withRegularExpressionList(Regex... regularExpressionList) { if (this.regularExpressionList == null) { setRegularExpressionList(new java.util.ArrayList(regularExpressionList.length)); } for (Regex ele : regularExpressionList) { this.regularExpressionList.add(ele); } return this; } /** *

* The regular expression patterns in the set. *

* * @param regularExpressionList * The regular expression patterns in the set. * @return Returns a reference to this object so that method calls can be chained together. */ public RegexPatternSet withRegularExpressionList(java.util.Collection regularExpressionList) { setRegularExpressionList(regularExpressionList); 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 (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getARN() != null) sb.append("ARN: ").append(getARN()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getRegularExpressionList() != null) sb.append("RegularExpressionList: ").append(getRegularExpressionList()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RegexPatternSet == false) return false; RegexPatternSet other = (RegexPatternSet) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getARN() == null ^ this.getARN() == null) return false; if (other.getARN() != null && other.getARN().equals(this.getARN()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getRegularExpressionList() == null ^ this.getRegularExpressionList() == null) return false; if (other.getRegularExpressionList() != null && other.getRegularExpressionList().equals(this.getRegularExpressionList()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getARN() == null) ? 0 : getARN().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getRegularExpressionList() == null) ? 0 : getRegularExpressionList().hashCode()); return hashCode; } @Override public RegexPatternSet clone() { try { return (RegexPatternSet) 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.RegexPatternSetMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy