@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRegexPatternSetId() == null) ? 0 : getRegexPatternSetId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getRegexPatternStrings() == null) ? 0 : getRegexPatternStrings().hashCode()); return hashCode; }
/** * <p> * A friendly name or description of the <a>RegexPatternSet</a>. You can't change <code>Name</code> after you create * a <code>RegexPatternSet</code>. * </p> * * @param name * A friendly name or description of the <a>RegexPatternSet</a>. You can't change <code>Name</code> after you * create a <code>RegexPatternSet</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public RegexPatternSet withName(String name) { setName(name); return this; }
/** * <p> * The identifier for the <code>RegexPatternSet</code>. You use <code>RegexPatternSetId</code> to get information * about a <code>RegexPatternSet</code>, update a <code>RegexPatternSet</code>, remove a * <code>RegexPatternSet</code> from a <code>RegexMatchSet</code>, and delete a <code>RegexPatternSet</code> from * AWS WAF. * </p> * <p> * <code>RegexMatchSetId</code> is returned by <a>CreateRegexPatternSet</a> and by <a>ListRegexPatternSets</a>. * </p> * * @param regexPatternSetId * The identifier for the <code>RegexPatternSet</code>. You use <code>RegexPatternSetId</code> to get * information about a <code>RegexPatternSet</code>, update a <code>RegexPatternSet</code>, remove a * <code>RegexPatternSet</code> from a <code>RegexMatchSet</code>, and delete a <code>RegexPatternSet</code> * from AWS WAF.</p> * <p> * <code>RegexMatchSetId</code> is returned by <a>CreateRegexPatternSet</a> and by * <a>ListRegexPatternSets</a>. * @return Returns a reference to this object so that method calls can be chained together. */ public RegexPatternSet withRegexPatternSetId(String regexPatternSetId) { setRegexPatternSetId(regexPatternSetId); return this; }
public RegexPatternSet unmarshall(JsonUnmarshallerContext context) throws Exception { RegexPatternSet regexPatternSet = new RegexPatternSet(); if (context.testExpression("RegexPatternSetId", targetDepth)) { context.nextToken(); regexPatternSet.setRegexPatternSetId(context.getUnmarshaller(String.class).unmarshall(context)); regexPatternSet.setName(context.getUnmarshaller(String.class).unmarshall(context)); regexPatternSet.setRegexPatternStrings(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRegexPatternSet() == null) ? 0 : getRegexPatternSet().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetRegexPatternSetResult == false) return false; GetRegexPatternSetResult other = (GetRegexPatternSetResult) obj; if (other.getRegexPatternSet() == null ^ this.getRegexPatternSet() == null) return false; if (other.getRegexPatternSet() != null && other.getRegexPatternSet().equals(this.getRegexPatternSet()) == false) return false; return true; }
/** * <p> * Specifies the regular expression (regex) patterns that you want AWS WAF to search for, such as * <code>B[a@]dB[o0]t</code>. * </p> * * @param regexPatternStrings * Specifies the regular expression (regex) patterns that you want AWS WAF to search for, such as * <code>B[a@]dB[o0]t</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public RegexPatternSet withRegexPatternStrings(java.util.Collection<String> regexPatternStrings) { setRegexPatternStrings(regexPatternStrings); return this; }
public RegexPatternSet unmarshall(JsonUnmarshallerContext context) throws Exception { RegexPatternSet regexPatternSet = new RegexPatternSet(); if (context.testExpression("RegexPatternSetId", targetDepth)) { context.nextToken(); regexPatternSet.setRegexPatternSetId(context.getUnmarshaller(String.class).unmarshall(context)); regexPatternSet.setName(context.getUnmarshaller(String.class).unmarshall(context)); regexPatternSet.setRegexPatternStrings(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRegexPatternSet() == null) ? 0 : getRegexPatternSet().hashCode()); hashCode = prime * hashCode + ((getChangeToken() == null) ? 0 : getChangeToken().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateRegexPatternSetResult == false) return false; CreateRegexPatternSetResult other = (CreateRegexPatternSetResult) obj; if (other.getRegexPatternSet() == null ^ this.getRegexPatternSet() == null) return false; if (other.getRegexPatternSet() != null && other.getRegexPatternSet().equals(this.getRegexPatternSet()) == false) return false; if (other.getChangeToken() == null ^ this.getChangeToken() == null) return false; if (other.getChangeToken() != null && other.getChangeToken().equals(this.getChangeToken()) == false) return false; return true; }
/** * <p> * Specifies the regular expression (regex) patterns that you want AWS WAF to search for, such as * <code>B[a@]dB[o0]t</code>. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setRegexPatternStrings(java.util.Collection)} or {@link #withRegexPatternStrings(java.util.Collection)} * if you want to override the existing values. * </p> * * @param regexPatternStrings * Specifies the regular expression (regex) patterns that you want AWS WAF to search for, such as * <code>B[a@]dB[o0]t</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public RegexPatternSet withRegexPatternStrings(String... regexPatternStrings) { if (this.regexPatternStrings == null) { setRegexPatternStrings(new java.util.ArrayList<String>(regexPatternStrings.length)); } for (String ele : regexPatternStrings) { this.regexPatternStrings.add(ele); } return this; }
@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.getRegexPatternSetId() == null ^ this.getRegexPatternSetId() == null) return false; if (other.getRegexPatternSetId() != null && other.getRegexPatternSetId().equals(this.getRegexPatternSetId()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getRegexPatternStrings() == null ^ this.getRegexPatternStrings() == null) return false; if (other.getRegexPatternStrings() != null && other.getRegexPatternStrings().equals(this.getRegexPatternStrings()) == false) return false; return true; }
/** * 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 (getRegexPatternSetId() != null) sb.append("RegexPatternSetId: ").append(getRegexPatternSetId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getRegexPatternStrings() != null) sb.append("RegexPatternStrings: ").append(getRegexPatternStrings()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(RegexPatternSet regexPatternSet, ProtocolMarshaller protocolMarshaller) { if (regexPatternSet == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(regexPatternSet.getRegexPatternSetId(), REGEXPATTERNSETID_BINDING); protocolMarshaller.marshall(regexPatternSet.getName(), NAME_BINDING); protocolMarshaller.marshall(regexPatternSet.getRegexPatternStrings(), REGEXPATTERNSTRINGS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * Marshall the given parameter object. */ public void marshall(RegexPatternSet regexPatternSet, ProtocolMarshaller protocolMarshaller) { if (regexPatternSet == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(regexPatternSet.getRegexPatternSetId(), REGEXPATTERNSETID_BINDING); protocolMarshaller.marshall(regexPatternSet.getName(), NAME_BINDING); protocolMarshaller.marshall(regexPatternSet.getRegexPatternStrings(), REGEXPATTERNSTRINGS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }