@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getIpFilter() == null) ? 0 : getIpFilter().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFilter() == null) ? 0 : getFilter().hashCode()); return hashCode; }
/** * <p> * A structure that provides the IP addresses to block or allow, and whether to block or allow incoming mail from * them. * </p> * * @param ipFilter * A structure that provides the IP addresses to block or allow, and whether to block or allow incoming mail * from them. * @return Returns a reference to this object so that method calls can be chained together. */ public ReceiptFilter withIpFilter(ReceiptIpFilter ipFilter) { setIpFilter(ipFilter); return this; }
public ReceiptFilter unmarshall(StaxUnmarshallerContext context) throws Exception { ReceiptFilter receiptFilter = new ReceiptFilter(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return receiptFilter; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Name", targetDepth)) { receiptFilter.setName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("IpFilter", targetDepth)) { receiptFilter.setIpFilter(ReceiptIpFilterStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return receiptFilter; } } } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateReceiptFilterRequest == false) return false; CreateReceiptFilterRequest other = (CreateReceiptFilterRequest) obj; if (other.getFilter() == null ^ this.getFilter() == null) return false; if (other.getFilter() != null && other.getFilter().equals(this.getFilter()) == false) return false; return true; }
setName(name); return this;
public ReceiptFilter unmarshall(StaxUnmarshallerContext context) throws Exception { ReceiptFilter receiptFilter = new ReceiptFilter(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) break; if (xmlEvent == XmlPullParser.START_TAG) { if (context.testExpression("Name", targetDepth)) { receiptFilter.setName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("IpFilter", targetDepth)) { receiptFilter.setIpFilter(ReceiptIpFilterStaxUnmarshaller.getInstance() .unmarshall(context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { break; } } } return receiptFilter; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateReceiptFilterRequest == false) return false; CreateReceiptFilterRequest other = (CreateReceiptFilterRequest) obj; if (other.getFilter() == null ^ this.getFilter() == null) return false; if (other.getFilter() != null && other.getFilter().equals(this.getFilter()) == false) return false; return true; } }
setName(name); return this;
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ReceiptFilter == false) return false; ReceiptFilter other = (ReceiptFilter) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getIpFilter() == null ^ this.getIpFilter() == null) return false; if (other.getIpFilter() != null && other.getIpFilter().equals(this.getIpFilter()) == false) return false; return true; }
public ReceiptFilter unmarshall(StaxUnmarshallerContext context) throws Exception { ReceiptFilter receiptFilter = new ReceiptFilter(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return receiptFilter; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Name", targetDepth)) { receiptFilter.setName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("IpFilter", targetDepth)) { receiptFilter.setIpFilter(ReceiptIpFilterStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return receiptFilter; } } } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFilter() == null) ? 0 : getFilter().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateReceiptFilterRequest == false) return false; CreateReceiptFilterRequest other = (CreateReceiptFilterRequest) obj; if (other.getFilter() == null ^ this.getFilter() == null) return false; if (other.getFilter() != null && other.getFilter().equals(this.getFilter()) == false) return false; return true; }
/** * <p> * A structure that provides the IP addresses to block or allow, and whether to block or allow incoming mail from * them. * </p> * * @param ipFilter * A structure that provides the IP addresses to block or allow, and whether to block or allow incoming mail * from them. * @return Returns a reference to this object so that method calls can be chained together. */ public ReceiptFilter withIpFilter(ReceiptIpFilter ipFilter) { setIpFilter(ipFilter); return this; }
/** * 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 (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getIpFilter() != null) sb.append("IpFilter: ").append(getIpFilter()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFilter() == null) ? 0 : getFilter().hashCode()); return hashCode; }
public Request<CreateReceiptFilterRequest> marshall(CreateReceiptFilterRequest createReceiptFilterRequest) { if (createReceiptFilterRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<CreateReceiptFilterRequest> request = new DefaultRequest<CreateReceiptFilterRequest>(createReceiptFilterRequest, "AmazonSimpleEmailService"); request.addParameter("Action", "CreateReceiptFilter"); request.addParameter("Version", "2010-12-01"); request.setHttpMethod(HttpMethodName.POST); { ReceiptFilter filter = createReceiptFilterRequest.getFilter(); if (filter != null) { if (filter.getName() != null) { request.addParameter("Filter.Name", StringUtils.fromString(filter.getName())); } { ReceiptIpFilter ipFilter = filter.getIpFilter(); if (ipFilter != null) { if (ipFilter.getPolicy() != null) { request.addParameter("Filter.IpFilter.Policy", StringUtils.fromString(ipFilter.getPolicy())); } if (ipFilter.getCidr() != null) { request.addParameter("Filter.IpFilter.Cidr", StringUtils.fromString(ipFilter.getCidr())); } } } } } return request; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getIpFilter() == null) ? 0 : getIpFilter().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ReceiptFilter == false) return false; ReceiptFilter other = (ReceiptFilter) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getIpFilter() == null ^ this.getIpFilter() == null) return false; if (other.getIpFilter() != null && other.getIpFilter().equals(this.getIpFilter()) == false) return false; return true; } }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getName() != null) sb.append("Name: " + getName() + ","); if (getIpFilter() != null) sb.append("IpFilter: " + getIpFilter()); sb.append("}"); return sb.toString(); }