@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRuleGroupId() == null) ? 0 : getRuleGroupId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); return hashCode; }
/** * <p> * A friendly name or description of the <a>RuleGroup</a>. You can't change the name of a <code>RuleGroup</code> * after you create it. * </p> * * @param name * A friendly name or description of the <a>RuleGroup</a>. You can't change the name of a * <code>RuleGroup</code> after you create it. * @return Returns a reference to this object so that method calls can be chained together. */ public RuleGroupSummary withName(String name) { setName(name); return this; }
/** * <p> * A unique identifier for a <code>RuleGroup</code>. You use <code>RuleGroupId</code> to get more information about * a <code>RuleGroup</code> (see <a>GetRuleGroup</a>), update a <code>RuleGroup</code> (see <a>UpdateRuleGroup</a>), * insert a <code>RuleGroup</code> into a <code>WebACL</code> or delete one from a <code>WebACL</code> (see * <a>UpdateWebACL</a>), or delete a <code>RuleGroup</code> from AWS WAF (see <a>DeleteRuleGroup</a>). * </p> * <p> * <code>RuleGroupId</code> is returned by <a>CreateRuleGroup</a> and by <a>ListRuleGroups</a>. * </p> * * @param ruleGroupId * A unique identifier for a <code>RuleGroup</code>. You use <code>RuleGroupId</code> to get more information * about a <code>RuleGroup</code> (see <a>GetRuleGroup</a>), update a <code>RuleGroup</code> (see * <a>UpdateRuleGroup</a>), insert a <code>RuleGroup</code> into a <code>WebACL</code> or delete one from a * <code>WebACL</code> (see <a>UpdateWebACL</a>), or delete a <code>RuleGroup</code> from AWS WAF (see * <a>DeleteRuleGroup</a>).</p> * <p> * <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 RuleGroupSummary withRuleGroupId(String ruleGroupId) { setRuleGroupId(ruleGroupId); return this; }
public RuleGroupSummary unmarshall(JsonUnmarshallerContext context) throws Exception { RuleGroupSummary ruleGroupSummary = new RuleGroupSummary(); if (context.testExpression("RuleGroupId", targetDepth)) { context.nextToken(); ruleGroupSummary.setRuleGroupId(context.getUnmarshaller(String.class).unmarshall(context)); ruleGroupSummary.setName(context.getUnmarshaller(String.class).unmarshall(context));
public RuleGroupSummary unmarshall(JsonUnmarshallerContext context) throws Exception { RuleGroupSummary ruleGroupSummary = new RuleGroupSummary(); if (context.testExpression("RuleGroupId", targetDepth)) { context.nextToken(); ruleGroupSummary.setRuleGroupId(context.getUnmarshaller(String.class).unmarshall(context)); ruleGroupSummary.setName(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 RuleGroupSummary == false) return false; RuleGroupSummary other = (RuleGroupSummary) obj; if (other.getRuleGroupId() == null ^ this.getRuleGroupId() == null) return false; if (other.getRuleGroupId() != null && other.getRuleGroupId().equals(this.getRuleGroupId()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == 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 (getName() != null) sb.append("Name: ").append(getName()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(RuleGroupSummary ruleGroupSummary, ProtocolMarshaller protocolMarshaller) { if (ruleGroupSummary == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(ruleGroupSummary.getRuleGroupId(), RULEGROUPID_BINDING); protocolMarshaller.marshall(ruleGroupSummary.getName(), NAME_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * Marshall the given parameter object. */ public void marshall(RuleGroupSummary ruleGroupSummary, ProtocolMarshaller protocolMarshaller) { if (ruleGroupSummary == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(ruleGroupSummary.getRuleGroupId(), RULEGROUPID_BINDING); protocolMarshaller.marshall(ruleGroupSummary.getName(), NAME_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }