@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSizeConstraintSetId() == null) ? 0 : getSizeConstraintSetId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getSizeConstraints() == null) ? 0 : getSizeConstraints().hashCode()); return hashCode; }
/** * <p> * The name, if any, of the <code>SizeConstraintSet</code>. * </p> * * @param name * The name, if any, of the <code>SizeConstraintSet</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public SizeConstraintSet withName(String name) { setName(name); return this; }
/** * <p> * A unique identifier for a <code>SizeConstraintSet</code>. You use <code>SizeConstraintSetId</code> to get * information about a <code>SizeConstraintSet</code> (see <a>GetSizeConstraintSet</a>), update a * <code>SizeConstraintSet</code> (see <a>UpdateSizeConstraintSet</a>), insert a <code>SizeConstraintSet</code> into * a <code>Rule</code> or delete one from a <code>Rule</code> (see <a>UpdateRule</a>), and delete a * <code>SizeConstraintSet</code> from AWS WAF (see <a>DeleteSizeConstraintSet</a>). * </p> * <p> * <code>SizeConstraintSetId</code> is returned by <a>CreateSizeConstraintSet</a> and by * <a>ListSizeConstraintSets</a>. * </p> * * @param sizeConstraintSetId * A unique identifier for a <code>SizeConstraintSet</code>. You use <code>SizeConstraintSetId</code> to get * information about a <code>SizeConstraintSet</code> (see <a>GetSizeConstraintSet</a>), update a * <code>SizeConstraintSet</code> (see <a>UpdateSizeConstraintSet</a>), insert a * <code>SizeConstraintSet</code> into a <code>Rule</code> or delete one from a <code>Rule</code> (see * <a>UpdateRule</a>), and delete a <code>SizeConstraintSet</code> from AWS WAF (see * <a>DeleteSizeConstraintSet</a>).</p> * <p> * <code>SizeConstraintSetId</code> is returned by <a>CreateSizeConstraintSet</a> and by * <a>ListSizeConstraintSets</a>. * @return Returns a reference to this object so that method calls can be chained together. */ public SizeConstraintSet withSizeConstraintSetId(String sizeConstraintSetId) { setSizeConstraintSetId(sizeConstraintSetId); return this; }
public SizeConstraintSet unmarshall(JsonUnmarshallerContext context) throws Exception { SizeConstraintSet sizeConstraintSet = new SizeConstraintSet(); if (context.testExpression("SizeConstraintSetId", targetDepth)) { context.nextToken(); sizeConstraintSet.setSizeConstraintSetId(context.getUnmarshaller(String.class).unmarshall(context)); sizeConstraintSet.setName(context.getUnmarshaller(String.class).unmarshall(context)); .setSizeConstraints(new ListUnmarshaller<SizeConstraint>(SizeConstraintJsonUnmarshaller.getInstance()).unmarshall(context));
/** * <p> * Specifies the parts of web requests that you want to inspect the size of. * </p> * * @param sizeConstraints * Specifies the parts of web requests that you want to inspect the size of. * @return Returns a reference to this object so that method calls can be chained together. */ public SizeConstraintSet withSizeConstraints(java.util.Collection<SizeConstraint> sizeConstraints) { setSizeConstraints(sizeConstraints); return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSizeConstraintSet() == null) ? 0 : getSizeConstraintSet().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetSizeConstraintSetResult == false) return false; GetSizeConstraintSetResult other = (GetSizeConstraintSetResult) obj; if (other.getSizeConstraintSet() == null ^ this.getSizeConstraintSet() == null) return false; if (other.getSizeConstraintSet() != null && other.getSizeConstraintSet().equals(this.getSizeConstraintSet()) == false) return false; return true; }
public SizeConstraintSet unmarshall(JsonUnmarshallerContext context) throws Exception { SizeConstraintSet sizeConstraintSet = new SizeConstraintSet(); if (context.testExpression("SizeConstraintSetId", targetDepth)) { context.nextToken(); sizeConstraintSet.setSizeConstraintSetId(context.getUnmarshaller(String.class).unmarshall(context)); sizeConstraintSet.setName(context.getUnmarshaller(String.class).unmarshall(context)); .setSizeConstraints(new ListUnmarshaller<SizeConstraint>(SizeConstraintJsonUnmarshaller.getInstance()).unmarshall(context));
/** * <p> * Specifies the parts of web requests that you want to inspect the size of. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setSizeConstraints(java.util.Collection)} or {@link #withSizeConstraints(java.util.Collection)} if you * want to override the existing values. * </p> * * @param sizeConstraints * Specifies the parts of web requests that you want to inspect the size of. * @return Returns a reference to this object so that method calls can be chained together. */ public SizeConstraintSet withSizeConstraints(SizeConstraint... sizeConstraints) { if (this.sizeConstraints == null) { setSizeConstraints(new java.util.ArrayList<SizeConstraint>(sizeConstraints.length)); } for (SizeConstraint ele : sizeConstraints) { this.sizeConstraints.add(ele); } return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSizeConstraintSet() == null) ? 0 : getSizeConstraintSet().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 CreateSizeConstraintSetResult == false) return false; CreateSizeConstraintSetResult other = (CreateSizeConstraintSetResult) obj; if (other.getSizeConstraintSet() == null ^ this.getSizeConstraintSet() == null) return false; if (other.getSizeConstraintSet() != null && other.getSizeConstraintSet().equals(this.getSizeConstraintSet()) == 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; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SizeConstraintSet == false) return false; SizeConstraintSet other = (SizeConstraintSet) obj; if (other.getSizeConstraintSetId() == null ^ this.getSizeConstraintSetId() == null) return false; if (other.getSizeConstraintSetId() != null && other.getSizeConstraintSetId().equals(this.getSizeConstraintSetId()) == 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.getSizeConstraints() == null ^ this.getSizeConstraints() == null) return false; if (other.getSizeConstraints() != null && other.getSizeConstraints().equals(this.getSizeConstraints()) == 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 (getSizeConstraintSetId() != null) sb.append("SizeConstraintSetId: ").append(getSizeConstraintSetId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getSizeConstraints() != null) sb.append("SizeConstraints: ").append(getSizeConstraints()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(SizeConstraintSet sizeConstraintSet, ProtocolMarshaller protocolMarshaller) { if (sizeConstraintSet == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(sizeConstraintSet.getSizeConstraintSetId(), SIZECONSTRAINTSETID_BINDING); protocolMarshaller.marshall(sizeConstraintSet.getName(), NAME_BINDING); protocolMarshaller.marshall(sizeConstraintSet.getSizeConstraints(), SIZECONSTRAINTS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * Marshall the given parameter object. */ public void marshall(SizeConstraintSet sizeConstraintSet, ProtocolMarshaller protocolMarshaller) { if (sizeConstraintSet == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(sizeConstraintSet.getSizeConstraintSetId(), SIZECONSTRAINTSETID_BINDING); protocolMarshaller.marshall(sizeConstraintSet.getName(), NAME_BINDING); protocolMarshaller.marshall(sizeConstraintSet.getSizeConstraints(), SIZECONSTRAINTS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }