@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFieldToMatch() == null) ? 0 : getFieldToMatch().hashCode()); hashCode = prime * hashCode + ((getTargetString() == null) ? 0 : getTargetString().hashCode()); hashCode = prime * hashCode + ((getTextTransformation() == null) ? 0 : getTextTransformation().hashCode()); hashCode = prime * hashCode + ((getPositionalConstraint() == null) ? 0 : getPositionalConstraint().hashCode()); return hashCode; }
/** * <p> * The part of a web request that you want AWS WAF to search, such as a specified header or a query string. For more * information, see <a>FieldToMatch</a>. * </p> * * @param fieldToMatch * The part of a web request that you want AWS WAF to search, such as a specified header or a query string. * For more information, see <a>FieldToMatch</a>. * @return Returns a reference to this object so that method calls can be chained together. */ public ByteMatchTuple withFieldToMatch(FieldToMatch fieldToMatch) { setFieldToMatch(fieldToMatch); return this; }
setPositionalConstraint(positionalConstraint); return this;
public ByteMatchTuple unmarshall(JsonUnmarshallerContext context) throws Exception { ByteMatchTuple byteMatchTuple = new ByteMatchTuple(); if (context.testExpression("FieldToMatch", targetDepth)) { context.nextToken(); byteMatchTuple.setFieldToMatch(FieldToMatchJsonUnmarshaller.getInstance().unmarshall(context)); byteMatchTuple.setTargetString(context.getUnmarshaller(java.nio.ByteBuffer.class).unmarshall(context)); byteMatchTuple.setTextTransformation(context.getUnmarshaller(String.class).unmarshall(context)); byteMatchTuple.setPositionalConstraint(context.getUnmarshaller(String.class).unmarshall(context));
setTargetString(targetString); return this;
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAction() == null) ? 0 : getAction().hashCode()); hashCode = prime * hashCode + ((getByteMatchTuple() == null) ? 0 : getByteMatchTuple().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ByteMatchSetUpdate == false) return false; ByteMatchSetUpdate other = (ByteMatchSetUpdate) obj; if (other.getAction() == null ^ this.getAction() == null) return false; if (other.getAction() != null && other.getAction().equals(this.getAction()) == false) return false; if (other.getByteMatchTuple() == null ^ this.getByteMatchTuple() == null) return false; if (other.getByteMatchTuple() != null && other.getByteMatchTuple().equals(this.getByteMatchTuple()) == false) return false; return true; }
public ByteMatchTuple unmarshall(JsonUnmarshallerContext context) throws Exception { ByteMatchTuple byteMatchTuple = new ByteMatchTuple(); if (context.testExpression("FieldToMatch", targetDepth)) { context.nextToken(); byteMatchTuple.setFieldToMatch(FieldToMatchJsonUnmarshaller.getInstance().unmarshall(context)); byteMatchTuple.setTargetString(context.getUnmarshaller(java.nio.ByteBuffer.class).unmarshall(context)); byteMatchTuple.setTextTransformation(context.getUnmarshaller(String.class).unmarshall(context)); byteMatchTuple.setPositionalConstraint(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 ByteMatchTuple == false) return false; ByteMatchTuple other = (ByteMatchTuple) obj; if (other.getFieldToMatch() == null ^ this.getFieldToMatch() == null) return false; if (other.getFieldToMatch() != null && other.getFieldToMatch().equals(this.getFieldToMatch()) == false) return false; if (other.getTargetString() == null ^ this.getTargetString() == null) return false; if (other.getTargetString() != null && other.getTargetString().equals(this.getTargetString()) == false) return false; if (other.getTextTransformation() == null ^ this.getTextTransformation() == null) return false; if (other.getTextTransformation() != null && other.getTextTransformation().equals(this.getTextTransformation()) == false) return false; if (other.getPositionalConstraint() == null ^ this.getPositionalConstraint() == null) return false; if (other.getPositionalConstraint() != null && other.getPositionalConstraint().equals(this.getPositionalConstraint()) == 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 (getFieldToMatch() != null) sb.append("FieldToMatch: ").append(getFieldToMatch()).append(","); if (getTargetString() != null) sb.append("TargetString: ").append(getTargetString()).append(","); if (getTextTransformation() != null) sb.append("TextTransformation: ").append(getTextTransformation()).append(","); if (getPositionalConstraint() != null) sb.append("PositionalConstraint: ").append(getPositionalConstraint()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(ByteMatchTuple byteMatchTuple, ProtocolMarshaller protocolMarshaller) { if (byteMatchTuple == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(byteMatchTuple.getFieldToMatch(), FIELDTOMATCH_BINDING); protocolMarshaller.marshall(byteMatchTuple.getTargetString(), TARGETSTRING_BINDING); protocolMarshaller.marshall(byteMatchTuple.getTextTransformation(), TEXTTRANSFORMATION_BINDING); protocolMarshaller.marshall(byteMatchTuple.getPositionalConstraint(), POSITIONALCONSTRAINT_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * Marshall the given parameter object. */ public void marshall(ByteMatchTuple byteMatchTuple, ProtocolMarshaller protocolMarshaller) { if (byteMatchTuple == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(byteMatchTuple.getFieldToMatch(), FIELDTOMATCH_BINDING); protocolMarshaller.marshall(byteMatchTuple.getTargetString(), TARGETSTRING_BINDING); protocolMarshaller.marshall(byteMatchTuple.getTextTransformation(), TEXTTRANSFORMATION_BINDING); protocolMarshaller.marshall(byteMatchTuple.getPositionalConstraint(), POSITIONALCONSTRAINT_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }