@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getWebACLId() == null) ? 0 : getWebACLId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getMetricName() == null) ? 0 : getMetricName().hashCode()); hashCode = prime * hashCode + ((getDefaultAction() == null) ? 0 : getDefaultAction().hashCode()); hashCode = prime * hashCode + ((getRules() == null) ? 0 : getRules().hashCode()); hashCode = prime * hashCode + ((getWebACLArn() == null) ? 0 : getWebACLArn().hashCode()); return hashCode; }
/** * <p> * The action to perform if none of the <code>Rules</code> contained in the <code>WebACL</code> match. The action is * specified by the <a>WafAction</a> object. * </p> * * @param defaultAction * The action to perform if none of the <code>Rules</code> contained in the <code>WebACL</code> match. The * action is specified by the <a>WafAction</a> object. * @return Returns a reference to this object so that method calls can be chained together. */ public WebACL withDefaultAction(WafAction defaultAction) { setDefaultAction(defaultAction); return this; }
public WebACL unmarshall(JsonUnmarshallerContext context) throws Exception { WebACL webACL = new WebACL(); if (context.testExpression("WebACLId", targetDepth)) { context.nextToken(); webACL.setWebACLId(context.getUnmarshaller(String.class).unmarshall(context)); webACL.setName(context.getUnmarshaller(String.class).unmarshall(context)); webACL.setMetricName(context.getUnmarshaller(String.class).unmarshall(context)); webACL.setDefaultAction(WafActionJsonUnmarshaller.getInstance().unmarshall(context)); webACL.setRules(new ListUnmarshaller<ActivatedRule>(ActivatedRuleJsonUnmarshaller.getInstance()).unmarshall(context)); webACL.setWebACLArn(context.getUnmarshaller(String.class).unmarshall(context));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getWebACL() == null) ? 0 : getWebACL().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetWebACLResult == false) return false; GetWebACLResult other = (GetWebACLResult) obj; if (other.getWebACL() == null ^ this.getWebACL() == null) return false; if (other.getWebACL() != null && other.getWebACL().equals(this.getWebACL()) == false) return false; return true; }
public WebACL unmarshall(JsonUnmarshallerContext context) throws Exception { WebACL webACL = new WebACL(); if (context.testExpression("WebACLId", targetDepth)) { context.nextToken(); webACL.setWebACLId(context.getUnmarshaller(String.class).unmarshall(context)); webACL.setName(context.getUnmarshaller(String.class).unmarshall(context)); webACL.setMetricName(context.getUnmarshaller(String.class).unmarshall(context)); webACL.setDefaultAction(WafActionJsonUnmarshaller.getInstance().unmarshall(context)); webACL.setRules(new ListUnmarshaller<ActivatedRule>(ActivatedRuleJsonUnmarshaller.getInstance()).unmarshall(context)); webACL.setWebACLArn(context.getUnmarshaller(String.class).unmarshall(context));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getWebACL() == null) ? 0 : getWebACL().hashCode()); hashCode = prime * hashCode + ((getChangeToken() == null) ? 0 : getChangeToken().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateWebACLResult == false) return false; CreateWebACLResult other = (CreateWebACLResult) obj; if (other.getWebACL() == null ^ this.getWebACL() == null) return false; if (other.getWebACL() != null && other.getWebACL().equals(this.getWebACL()) == 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; }
return false; WebACL other = (WebACL) obj; if (other.getWebACLId() == null ^ this.getWebACLId() == null) return false; if (other.getWebACLId() != null && other.getWebACLId().equals(this.getWebACLId()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getMetricName() == null ^ this.getMetricName() == null) return false; if (other.getMetricName() != null && other.getMetricName().equals(this.getMetricName()) == false) return false; if (other.getDefaultAction() == null ^ this.getDefaultAction() == null) return false; if (other.getDefaultAction() != null && other.getDefaultAction().equals(this.getDefaultAction()) == false) return false; if (other.getRules() == null ^ this.getRules() == null) return false; if (other.getRules() != null && other.getRules().equals(this.getRules()) == false) return false; if (other.getWebACLArn() == null ^ this.getWebACLArn() == null) return false; if (other.getWebACLArn() != null && other.getWebACLArn().equals(this.getWebACLArn()) == 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 (getWebACLId() != null) sb.append("WebACLId: ").append(getWebACLId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getMetricName() != null) sb.append("MetricName: ").append(getMetricName()).append(","); if (getDefaultAction() != null) sb.append("DefaultAction: ").append(getDefaultAction()).append(","); if (getRules() != null) sb.append("Rules: ").append(getRules()).append(","); if (getWebACLArn() != null) sb.append("WebACLArn: ").append(getWebACLArn()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(WebACL webACL, ProtocolMarshaller protocolMarshaller) { if (webACL == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(webACL.getWebACLId(), WEBACLID_BINDING); protocolMarshaller.marshall(webACL.getName(), NAME_BINDING); protocolMarshaller.marshall(webACL.getMetricName(), METRICNAME_BINDING); protocolMarshaller.marshall(webACL.getDefaultAction(), DEFAULTACTION_BINDING); protocolMarshaller.marshall(webACL.getRules(), RULES_BINDING); protocolMarshaller.marshall(webACL.getWebACLArn(), WEBACLARN_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * Marshall the given parameter object. */ public void marshall(WebACL webACL, ProtocolMarshaller protocolMarshaller) { if (webACL == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(webACL.getWebACLId(), WEBACLID_BINDING); protocolMarshaller.marshall(webACL.getName(), NAME_BINDING); protocolMarshaller.marshall(webACL.getMetricName(), METRICNAME_BINDING); protocolMarshaller.marshall(webACL.getDefaultAction(), DEFAULTACTION_BINDING); protocolMarshaller.marshall(webACL.getRules(), RULES_BINDING); protocolMarshaller.marshall(webACL.getWebACLArn(), WEBACLARN_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }