@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getGeoMatchSetId() == null) ? 0 : getGeoMatchSetId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getGeoMatchConstraints() == null) ? 0 : getGeoMatchConstraints().hashCode()); return hashCode; }
/** * <p> * An array of <a>GeoMatchConstraint</a> objects, which contain the country that you want AWS WAF to search for. * </p> * * @param geoMatchConstraints * An array of <a>GeoMatchConstraint</a> objects, which contain the country that you want AWS WAF to search * for. * @return Returns a reference to this object so that method calls can be chained together. */ public GeoMatchSet withGeoMatchConstraints(java.util.Collection<GeoMatchConstraint> geoMatchConstraints) { setGeoMatchConstraints(geoMatchConstraints); return this; }
/** * <p> * The <code>GeoMatchSetId</code> for an <code>GeoMatchSet</code>. You use <code>GeoMatchSetId</code> to get * information about a <code>GeoMatchSet</code> (see <a>GeoMatchSet</a>), update a <code>GeoMatchSet</code> (see * <a>UpdateGeoMatchSet</a>), insert a <code>GeoMatchSet</code> into a <code>Rule</code> or delete one from a * <code>Rule</code> (see <a>UpdateRule</a>), and delete a <code>GeoMatchSet</code> from AWS WAF (see * <a>DeleteGeoMatchSet</a>). * </p> * <p> * <code>GeoMatchSetId</code> is returned by <a>CreateGeoMatchSet</a> and by <a>ListGeoMatchSets</a>. * </p> * * @param geoMatchSetId * The <code>GeoMatchSetId</code> for an <code>GeoMatchSet</code>. You use <code>GeoMatchSetId</code> to get * information about a <code>GeoMatchSet</code> (see <a>GeoMatchSet</a>), update a <code>GeoMatchSet</code> * (see <a>UpdateGeoMatchSet</a>), insert a <code>GeoMatchSet</code> into a <code>Rule</code> or delete one * from a <code>Rule</code> (see <a>UpdateRule</a>), and delete a <code>GeoMatchSet</code> from AWS WAF (see * <a>DeleteGeoMatchSet</a>).</p> * <p> * <code>GeoMatchSetId</code> is returned by <a>CreateGeoMatchSet</a> and by <a>ListGeoMatchSets</a>. * @return Returns a reference to this object so that method calls can be chained together. */ public GeoMatchSet withGeoMatchSetId(String geoMatchSetId) { setGeoMatchSetId(geoMatchSetId); return this; }
public GeoMatchSet unmarshall(JsonUnmarshallerContext context) throws Exception { GeoMatchSet geoMatchSet = new GeoMatchSet(); if (context.testExpression("GeoMatchSetId", targetDepth)) { context.nextToken(); geoMatchSet.setGeoMatchSetId(context.getUnmarshaller(String.class).unmarshall(context)); geoMatchSet.setName(context.getUnmarshaller(String.class).unmarshall(context)); geoMatchSet.setGeoMatchConstraints(new ListUnmarshaller<GeoMatchConstraint>(GeoMatchConstraintJsonUnmarshaller.getInstance()) .unmarshall(context));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getGeoMatchSet() == null) ? 0 : getGeoMatchSet().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetGeoMatchSetResult == false) return false; GetGeoMatchSetResult other = (GetGeoMatchSetResult) obj; if (other.getGeoMatchSet() == null ^ this.getGeoMatchSet() == null) return false; if (other.getGeoMatchSet() != null && other.getGeoMatchSet().equals(this.getGeoMatchSet()) == false) return false; return true; }
/** * <p> * A friendly name or description of the <a>GeoMatchSet</a>. You can't change the name of an * <code>GeoMatchSet</code> after you create it. * </p> * * @param name * A friendly name or description of the <a>GeoMatchSet</a>. You can't change the name of an * <code>GeoMatchSet</code> after you create it. * @return Returns a reference to this object so that method calls can be chained together. */ public GeoMatchSet withName(String name) { setName(name); return this; }
public GeoMatchSet unmarshall(JsonUnmarshallerContext context) throws Exception { GeoMatchSet geoMatchSet = new GeoMatchSet(); if (context.testExpression("GeoMatchSetId", targetDepth)) { context.nextToken(); geoMatchSet.setGeoMatchSetId(context.getUnmarshaller(String.class).unmarshall(context)); geoMatchSet.setName(context.getUnmarshaller(String.class).unmarshall(context)); geoMatchSet.setGeoMatchConstraints(new ListUnmarshaller<GeoMatchConstraint>(GeoMatchConstraintJsonUnmarshaller.getInstance()) .unmarshall(context));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getGeoMatchSet() == null) ? 0 : getGeoMatchSet().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 CreateGeoMatchSetResult == false) return false; CreateGeoMatchSetResult other = (CreateGeoMatchSetResult) obj; if (other.getGeoMatchSet() == null ^ this.getGeoMatchSet() == null) return false; if (other.getGeoMatchSet() != null && other.getGeoMatchSet().equals(this.getGeoMatchSet()) == 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 GeoMatchSet == false) return false; GeoMatchSet other = (GeoMatchSet) obj; if (other.getGeoMatchSetId() == null ^ this.getGeoMatchSetId() == null) return false; if (other.getGeoMatchSetId() != null && other.getGeoMatchSetId().equals(this.getGeoMatchSetId()) == 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.getGeoMatchConstraints() == null ^ this.getGeoMatchConstraints() == null) return false; if (other.getGeoMatchConstraints() != null && other.getGeoMatchConstraints().equals(this.getGeoMatchConstraints()) == false) return false; return true; }
/** * <p> * An array of <a>GeoMatchConstraint</a> objects, which contain the country that you want AWS WAF to search for. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setGeoMatchConstraints(java.util.Collection)} or {@link #withGeoMatchConstraints(java.util.Collection)} * if you want to override the existing values. * </p> * * @param geoMatchConstraints * An array of <a>GeoMatchConstraint</a> objects, which contain the country that you want AWS WAF to search * for. * @return Returns a reference to this object so that method calls can be chained together. */ public GeoMatchSet withGeoMatchConstraints(GeoMatchConstraint... geoMatchConstraints) { if (this.geoMatchConstraints == null) { setGeoMatchConstraints(new java.util.ArrayList<GeoMatchConstraint>(geoMatchConstraints.length)); } for (GeoMatchConstraint ele : geoMatchConstraints) { this.geoMatchConstraints.add(ele); } 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 (getGeoMatchSetId() != null) sb.append("GeoMatchSetId: ").append(getGeoMatchSetId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getGeoMatchConstraints() != null) sb.append("GeoMatchConstraints: ").append(getGeoMatchConstraints()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(GeoMatchSet geoMatchSet, ProtocolMarshaller protocolMarshaller) { if (geoMatchSet == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(geoMatchSet.getGeoMatchSetId(), GEOMATCHSETID_BINDING); protocolMarshaller.marshall(geoMatchSet.getName(), NAME_BINDING); protocolMarshaller.marshall(geoMatchSet.getGeoMatchConstraints(), GEOMATCHCONSTRAINTS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * Marshall the given parameter object. */ public void marshall(GeoMatchSet geoMatchSet, ProtocolMarshaller protocolMarshaller) { if (geoMatchSet == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(geoMatchSet.getGeoMatchSetId(), GEOMATCHSETID_BINDING); protocolMarshaller.marshall(geoMatchSet.getName(), NAME_BINDING); protocolMarshaller.marshall(geoMatchSet.getGeoMatchConstraints(), GEOMATCHCONSTRAINTS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }