@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof WafOverrideAction == false) return false; WafOverrideAction other = (WafOverrideAction) obj; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; return true; }
/** * <p> * <code>COUNT</code> overrides the action specified by the individual rule within a <code>RuleGroup</code> . If set * to <code>NONE</code>, the rule's action will take place. * </p> * * @param type * <code>COUNT</code> overrides the action specified by the individual rule within a <code>RuleGroup</code> . * If set to <code>NONE</code>, the rule's action will take place. * @return Returns a reference to this object so that method calls can be chained together. * @see WafOverrideActionType */ public WafOverrideAction withType(String type) { setType(type); return this; }
public WafOverrideAction unmarshall(JsonUnmarshallerContext context) throws Exception { WafOverrideAction wafOverrideAction = new WafOverrideAction(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return null; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("Type", targetDepth)) { context.nextToken(); wafOverrideAction.setType(context.getUnmarshaller(String.class).unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return wafOverrideAction; }
@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; }
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)
public WafOverrideAction unmarshall(JsonUnmarshallerContext context) throws Exception { WafOverrideAction wafOverrideAction = new WafOverrideAction(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return null; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("Type", targetDepth)) { context.nextToken(); wafOverrideAction.setType(context.getUnmarshaller(String.class).unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return wafOverrideAction; }
/** * 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 (getType() != null) sb.append("Type: ").append(getType()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(WafOverrideAction wafOverrideAction, ProtocolMarshaller protocolMarshaller) { if (wafOverrideAction == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(wafOverrideAction.getType(), TYPE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * Marshall the given parameter object. */ public void marshall(WafOverrideAction wafOverrideAction, ProtocolMarshaller protocolMarshaller) { if (wafOverrideAction == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(wafOverrideAction.getType(), TYPE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }