/** * 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(); }
@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; }
/** * 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); } }
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)