@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPriority() == null) ? 0 : getPriority().hashCode()); hashCode = prime * hashCode + ((getRuleId() == null) ? 0 : getRuleId().hashCode()); hashCode = prime * hashCode + ((getAction() == null) ? 0 : getAction().hashCode()); hashCode = prime * hashCode + ((getOverrideAction() == null) ? 0 : getOverrideAction().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getExcludedRules() == null) ? 0 : getExcludedRules().hashCode()); return hashCode; }
setAction(action); return this;
public ActivatedRule unmarshall(JsonUnmarshallerContext context) throws Exception { ActivatedRule activatedRule = new ActivatedRule(); if (context.testExpression("Priority", targetDepth)) { context.nextToken(); activatedRule.setPriority(context.getUnmarshaller(Integer.class).unmarshall(context)); activatedRule.setRuleId(context.getUnmarshaller(String.class).unmarshall(context)); activatedRule.setAction(WafActionJsonUnmarshaller.getInstance().unmarshall(context)); activatedRule.setOverrideAction(WafOverrideActionJsonUnmarshaller.getInstance().unmarshall(context)); activatedRule.setType(context.getUnmarshaller(String.class).unmarshall(context)); activatedRule.setExcludedRules(new ListUnmarshaller<ExcludedRule>(ExcludedRuleJsonUnmarshaller.getInstance()).unmarshall(context));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAction() == null) ? 0 : getAction().hashCode()); hashCode = prime * hashCode + ((getActivatedRule() == null) ? 0 : getActivatedRule().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof WebACLUpdate == false) return false; WebACLUpdate other = (WebACLUpdate) obj; if (other.getAction() == null ^ this.getAction() == null) return false; if (other.getAction() != null && other.getAction().equals(this.getAction()) == false) return false; if (other.getActivatedRule() == null ^ this.getActivatedRule() == null) return false; if (other.getActivatedRule() != null && other.getActivatedRule().equals(this.getActivatedRule()) == false) return false; return true; }
public ActivatedRule unmarshall(JsonUnmarshallerContext context) throws Exception { ActivatedRule activatedRule = new ActivatedRule(); if (context.testExpression("Priority", targetDepth)) { context.nextToken(); activatedRule.setPriority(context.getUnmarshaller(Integer.class).unmarshall(context)); activatedRule.setRuleId(context.getUnmarshaller(String.class).unmarshall(context)); activatedRule.setAction(WafActionJsonUnmarshaller.getInstance().unmarshall(context)); activatedRule.setOverrideAction(WafOverrideActionJsonUnmarshaller.getInstance().unmarshall(context)); activatedRule.setType(context.getUnmarshaller(String.class).unmarshall(context)); activatedRule.setExcludedRules(new ListUnmarshaller<ExcludedRule>(ExcludedRuleJsonUnmarshaller.getInstance()).unmarshall(context));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAction() == null) ? 0 : getAction().hashCode()); hashCode = prime * hashCode + ((getActivatedRule() == null) ? 0 : getActivatedRule().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RuleGroupUpdate == false) return false; RuleGroupUpdate other = (RuleGroupUpdate) obj; if (other.getAction() == null ^ this.getAction() == null) return false; if (other.getAction() != null && other.getAction().equals(this.getAction()) == false) return false; if (other.getActivatedRule() == null ^ this.getActivatedRule() == null) return false; if (other.getActivatedRule() != null && other.getActivatedRule().equals(this.getActivatedRule()) == false) return false; return true; }
return false; ActivatedRule other = (ActivatedRule) obj; if (other.getPriority() == null ^ this.getPriority() == null) return false; if (other.getPriority() != null && other.getPriority().equals(this.getPriority()) == false) return false; if (other.getRuleId() == null ^ this.getRuleId() == null) return false; if (other.getRuleId() != null && other.getRuleId().equals(this.getRuleId()) == false) return false; if (other.getAction() == null ^ this.getAction() == null) return false; if (other.getAction() != null && other.getAction().equals(this.getAction()) == false) return false; if (other.getOverrideAction() == null ^ this.getOverrideAction() == null) return false; if (other.getOverrideAction() != null && other.getOverrideAction().equals(this.getOverrideAction()) == 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.getExcludedRules() == null ^ this.getExcludedRules() == null) return false; if (other.getExcludedRules() != null && other.getExcludedRules().equals(this.getExcludedRules()) == 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 (getPriority() != null) sb.append("Priority: ").append(getPriority()).append(","); if (getRuleId() != null) sb.append("RuleId: ").append(getRuleId()).append(","); if (getAction() != null) sb.append("Action: ").append(getAction()).append(","); if (getOverrideAction() != null) sb.append("OverrideAction: ").append(getOverrideAction()).append(","); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getExcludedRules() != null) sb.append("ExcludedRules: ").append(getExcludedRules()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(ActivatedRule activatedRule, ProtocolMarshaller protocolMarshaller) { if (activatedRule == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(activatedRule.getPriority(), PRIORITY_BINDING); protocolMarshaller.marshall(activatedRule.getRuleId(), RULEID_BINDING); protocolMarshaller.marshall(activatedRule.getAction(), ACTION_BINDING); protocolMarshaller.marshall(activatedRule.getOverrideAction(), OVERRIDEACTION_BINDING); protocolMarshaller.marshall(activatedRule.getType(), TYPE_BINDING); protocolMarshaller.marshall(activatedRule.getExcludedRules(), EXCLUDEDRULES_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * Marshall the given parameter object. */ public void marshall(ActivatedRule activatedRule, ProtocolMarshaller protocolMarshaller) { if (activatedRule == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(activatedRule.getPriority(), PRIORITY_BINDING); protocolMarshaller.marshall(activatedRule.getRuleId(), RULEID_BINDING); protocolMarshaller.marshall(activatedRule.getAction(), ACTION_BINDING); protocolMarshaller.marshall(activatedRule.getOverrideAction(), OVERRIDEACTION_BINDING); protocolMarshaller.marshall(activatedRule.getType(), TYPE_BINDING); protocolMarshaller.marshall(activatedRule.getExcludedRules(), EXCLUDEDRULES_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }