@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getNegated() == null) ? 0 : getNegated().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getDataId() == null) ? 0 : getDataId().hashCode()); return hashCode; }
/** * <p> * A unique identifier for a predicate in a <code>Rule</code>, such as <code>ByteMatchSetId</code> or * <code>IPSetId</code>. The ID is returned by the corresponding <code>Create</code> or <code>List</code> command. * </p> * * @param dataId * A unique identifier for a predicate in a <code>Rule</code>, such as <code>ByteMatchSetId</code> or * <code>IPSetId</code>. The ID is returned by the corresponding <code>Create</code> or <code>List</code> * command. * @return Returns a reference to this object so that method calls can be chained together. */ public Predicate withDataId(String dataId) { setDataId(dataId); return this; }
setNegated(negated); return this;
public Predicate unmarshall(JsonUnmarshallerContext context) throws Exception { Predicate predicate = new Predicate(); if (context.testExpression("Negated", targetDepth)) { context.nextToken(); predicate.setNegated(context.getUnmarshaller(Boolean.class).unmarshall(context)); predicate.setType(context.getUnmarshaller(String.class).unmarshall(context)); predicate.setDataId(context.getUnmarshaller(String.class).unmarshall(context));
/** * <p> * The type of predicate in a <code>Rule</code>, such as <code>ByteMatch</code> or <code>IPSet</code>. * </p> * * @param type * The type of predicate in a <code>Rule</code>, such as <code>ByteMatch</code> or <code>IPSet</code>. * @see PredicateType */ public void setType(PredicateType type) { withType(type); }
/** * <p> * The type of predicate in a <code>Rule</code>, such as <code>ByteMatch</code> or <code>IPSet</code>. * </p> * * @param type * The type of predicate in a <code>Rule</code>, such as <code>ByteMatch</code> or <code>IPSet</code>. * @return Returns a reference to this object so that method calls can be chained together. * @see PredicateType */ public Predicate withType(String type) { setType(type); return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAction() == null) ? 0 : getAction().hashCode()); hashCode = prime * hashCode + ((getPredicate() == null) ? 0 : getPredicate().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RuleUpdate == false) return false; RuleUpdate other = (RuleUpdate) obj; if (other.getAction() == null ^ this.getAction() == null) return false; if (other.getAction() != null && other.getAction().equals(this.getAction()) == false) return false; if (other.getPredicate() == null ^ this.getPredicate() == null) return false; if (other.getPredicate() != null && other.getPredicate().equals(this.getPredicate()) == false) return false; return true; }
public Predicate unmarshall(JsonUnmarshallerContext context) throws Exception { Predicate predicate = new Predicate(); if (context.testExpression("Negated", targetDepth)) { context.nextToken(); predicate.setNegated(context.getUnmarshaller(Boolean.class).unmarshall(context)); predicate.setType(context.getUnmarshaller(String.class).unmarshall(context)); predicate.setDataId(context.getUnmarshaller(String.class).unmarshall(context));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Predicate == false) return false; Predicate other = (Predicate) obj; if (other.getNegated() == null ^ this.getNegated() == null) return false; if (other.getNegated() != null && other.getNegated().equals(this.getNegated()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getDataId() == null ^ this.getDataId() == null) return false; if (other.getDataId() != null && other.getDataId().equals(this.getDataId()) == 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 (getNegated() != null) sb.append("Negated: ").append(getNegated()).append(","); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getDataId() != null) sb.append("DataId: ").append(getDataId()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(Predicate predicate, ProtocolMarshaller protocolMarshaller) { if (predicate == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(predicate.getNegated(), NEGATED_BINDING); protocolMarshaller.marshall(predicate.getType(), TYPE_BINDING); protocolMarshaller.marshall(predicate.getDataId(), DATAID_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * Marshall the given parameter object. */ public void marshall(Predicate predicate, ProtocolMarshaller protocolMarshaller) { if (predicate == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(predicate.getNegated(), NEGATED_BINDING); protocolMarshaller.marshall(predicate.getType(), TYPE_BINDING); protocolMarshaller.marshall(predicate.getDataId(), DATAID_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }