@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDocument() == null) ? 0 : getDocument().hashCode()); hashCode = prime * hashCode + ((getComment() == null) ? 0 : getComment().hashCode()); return hashCode; }
/** * <p> * (Optional) Any comments that you want to include about the traffic policy. * </p> * * @param comment * (Optional) Any comments that you want to include about the traffic policy. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateTrafficPolicyRequest withComment(String comment) { setComment(comment); return this; }
/** * <p> * The definition of this traffic policy in JSON format. For more information, see <a * href="http://docs.aws.amazon.com/Route53/latest/APIReference/api-policies-traffic-policy-document-format.html" * >Traffic Policy Document Format</a>. * </p> * * @param document * The definition of this traffic policy in JSON format. For more information, see <a href= * "http://docs.aws.amazon.com/Route53/latest/APIReference/api-policies-traffic-policy-document-format.html" * >Traffic Policy Document Format</a>. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateTrafficPolicyRequest withDocument(String document) { setDocument(document); return this; }
/** * <p> * The name of the traffic policy. * </p> * * @param name * The name of the traffic policy. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateTrafficPolicyRequest withName(String name) { setName(name); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateTrafficPolicyRequest == false) return false; CreateTrafficPolicyRequest other = (CreateTrafficPolicyRequest) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getDocument() == null ^ this.getDocument() == null) return false; if (other.getDocument() != null && other.getDocument().equals(this.getDocument()) == false) return false; if (other.getComment() == null ^ this.getComment() == null) return false; if (other.getComment() != null && other.getComment().equals(this.getComment()) == 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 (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getDocument() != null) sb.append("Document: ").append(getDocument()).append(","); if (getComment() != null) sb.append("Comment: ").append(getComment()); sb.append("}"); return sb.toString(); }
if (createTrafficPolicyRequest != null) { if (createTrafficPolicyRequest.getName() != null) { xmlWriter.startElement("Name").value(createTrafficPolicyRequest.getName()).endElement(); if (createTrafficPolicyRequest.getDocument() != null) { xmlWriter.startElement("Document").value(createTrafficPolicyRequest.getDocument()).endElement(); if (createTrafficPolicyRequest.getComment() != null) { xmlWriter.startElement("Comment").value(createTrafficPolicyRequest.getComment()).endElement();