@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRuleGroupId() == null) ? 0 : getRuleGroupId().hashCode()); hashCode = prime * hashCode + ((getUpdates() == null) ? 0 : getUpdates().hashCode()); hashCode = prime * hashCode + ((getChangeToken() == null) ? 0 : getChangeToken().hashCode()); return hashCode; }
/** * <p> * The value returned by the most recent call to <a>GetChangeToken</a>. * </p> * * @param changeToken * The value returned by the most recent call to <a>GetChangeToken</a>. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateRuleGroupRequest withChangeToken(String changeToken) { setChangeToken(changeToken); return this; }
/** * <p> * The <code>RuleGroupId</code> of the <a>RuleGroup</a> that you want to update. <code>RuleGroupId</code> is * returned by <a>CreateRuleGroup</a> and by <a>ListRuleGroups</a>. * </p> * * @param ruleGroupId * The <code>RuleGroupId</code> of the <a>RuleGroup</a> that you want to update. <code>RuleGroupId</code> is * returned by <a>CreateRuleGroup</a> and by <a>ListRuleGroups</a>. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateRuleGroupRequest withRuleGroupId(String ruleGroupId) { setRuleGroupId(ruleGroupId); return this; }
/** * <p> * An array of <code>RuleGroupUpdate</code> objects that you want to insert into or delete from a <a>RuleGroup</a>. * </p> * <p> * You can only insert <code>REGULAR</code> rules into a rule group. * </p> * <p> * <code>ActivatedRule|OverrideAction</code> applies only when updating or adding a <code>RuleGroup</code> to a * <code>WebACL</code>. In this case you do not use <code>ActivatedRule|Action</code>. For all other update * requests, <code>ActivatedRule|Action</code> is used instead of <code>ActivatedRule|OverrideAction</code>. * </p> * * @param updates * An array of <code>RuleGroupUpdate</code> objects that you want to insert into or delete from a * <a>RuleGroup</a>.</p> * <p> * You can only insert <code>REGULAR</code> rules into a rule group. * </p> * <p> * <code>ActivatedRule|OverrideAction</code> applies only when updating or adding a <code>RuleGroup</code> to * a <code>WebACL</code>. In this case you do not use <code>ActivatedRule|Action</code>. For all other update * requests, <code>ActivatedRule|Action</code> is used instead of <code>ActivatedRule|OverrideAction</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateRuleGroupRequest withUpdates(java.util.Collection<RuleGroupUpdate> updates) { setUpdates(updates); return this; }
setUpdates(new java.util.ArrayList<RuleGroupUpdate>(updates.length));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateRuleGroupRequest == false) return false; UpdateRuleGroupRequest other = (UpdateRuleGroupRequest) obj; if (other.getRuleGroupId() == null ^ this.getRuleGroupId() == null) return false; if (other.getRuleGroupId() != null && other.getRuleGroupId().equals(this.getRuleGroupId()) == false) return false; if (other.getUpdates() == null ^ this.getUpdates() == null) return false; if (other.getUpdates() != null && other.getUpdates().equals(this.getUpdates()) == 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; }
/** * 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 (getRuleGroupId() != null) sb.append("RuleGroupId: ").append(getRuleGroupId()).append(","); if (getUpdates() != null) sb.append("Updates: ").append(getUpdates()).append(","); if (getChangeToken() != null) sb.append("ChangeToken: ").append(getChangeToken()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(UpdateRuleGroupRequest updateRuleGroupRequest, ProtocolMarshaller protocolMarshaller) { if (updateRuleGroupRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(updateRuleGroupRequest.getRuleGroupId(), RULEGROUPID_BINDING); protocolMarshaller.marshall(updateRuleGroupRequest.getUpdates(), UPDATES_BINDING); protocolMarshaller.marshall(updateRuleGroupRequest.getChangeToken(), CHANGETOKEN_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * Marshall the given parameter object. */ public void marshall(UpdateRuleGroupRequest updateRuleGroupRequest, ProtocolMarshaller protocolMarshaller) { if (updateRuleGroupRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(updateRuleGroupRequest.getRuleGroupId(), RULEGROUPID_BINDING); protocolMarshaller.marshall(updateRuleGroupRequest.getUpdates(), UPDATES_BINDING); protocolMarshaller.marshall(updateRuleGroupRequest.getChangeToken(), CHANGETOKEN_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }