@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTemplateName() == null) ? 0 : getTemplateName().hashCode()); hashCode = prime * hashCode + ((getSubjectPart() == null) ? 0 : getSubjectPart().hashCode()); hashCode = prime * hashCode + ((getTextPart() == null) ? 0 : getTextPart().hashCode()); hashCode = prime * hashCode + ((getHtmlPart() == null) ? 0 : getHtmlPart().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTemplate() == null) ? 0 : getTemplate().hashCode()); return hashCode; }
/** * <p> * The HTML body of the email. * </p> * * @param htmlPart * The HTML body of the email. * @return Returns a reference to this object so that method calls can be chained together. */ public Template withHtmlPart(String htmlPart) { setHtmlPart(htmlPart); return this; }
public Template unmarshall(StaxUnmarshallerContext context) throws Exception { Template template = new Template(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; template.setTemplateName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; template.setSubjectPart(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; template.setTextPart(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; template.setHtmlPart(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue;
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateTemplateRequest == false) return false; CreateTemplateRequest other = (CreateTemplateRequest) obj; if (other.getTemplate() == null ^ this.getTemplate() == null) return false; if (other.getTemplate() != null && other.getTemplate().equals(this.getTemplate()) == false) return false; return true; }
/** * <p> * The subject line of the email. * </p> * * @param subjectPart * The subject line of the email. * @return Returns a reference to this object so that method calls can be chained together. */ public Template withSubjectPart(String subjectPart) { setSubjectPart(subjectPart); return this; }
/** * <p> * The name of the template. You will refer to this name when you send email using the * <code>SendTemplatedEmail</code> or <code>SendBulkTemplatedEmail</code> operations. * </p> * * @param templateName * The name of the template. You will refer to this name when you send email using the * <code>SendTemplatedEmail</code> or <code>SendBulkTemplatedEmail</code> operations. * @return Returns a reference to this object so that method calls can be chained together. */ public Template withTemplateName(String templateName) { setTemplateName(templateName); return this; }
public Template unmarshall(StaxUnmarshallerContext context) throws Exception { Template template = new Template(); template.setTemplateName(StringStaxUnmarshaller.getInstance().unmarshall( context)); continue; template.setSubjectPart(StringStaxUnmarshaller.getInstance() .unmarshall(context)); continue; template.setTextPart(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; template.setHtmlPart(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue;
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetTemplateResult == false) return false; GetTemplateResult other = (GetTemplateResult) obj; if (other.getTemplate() == null ^ this.getTemplate() == null) return false; if (other.getTemplate() != null && other.getTemplate().equals(this.getTemplate()) == false) return false; return true; }
/** * <p> * The subject line of the email. * </p> * * @param subjectPart * The subject line of the email. * @return Returns a reference to this object so that method calls can be chained together. */ public Template withSubjectPart(String subjectPart) { setSubjectPart(subjectPart); return this; }
/** * <p> * The name of the template. You will refer to this name when you send email using the * <code>SendTemplatedEmail</code> or <code>SendBulkTemplatedEmail</code> operations. * </p> * * @param templateName * The name of the template. You will refer to this name when you send email using the * <code>SendTemplatedEmail</code> or <code>SendBulkTemplatedEmail</code> operations. * @return Returns a reference to this object so that method calls can be chained together. */ public Template withTemplateName(String templateName) { setTemplateName(templateName); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Template == false) return false; Template other = (Template) obj; if (other.getTemplateName() == null ^ this.getTemplateName() == null) return false; if (other.getTemplateName() != null && other.getTemplateName().equals(this.getTemplateName()) == false) return false; if (other.getSubjectPart() == null ^ this.getSubjectPart() == null) return false; if (other.getSubjectPart() != null && other.getSubjectPart().equals(this.getSubjectPart()) == false) return false; if (other.getTextPart() == null ^ this.getTextPart() == null) return false; if (other.getTextPart() != null && other.getTextPart().equals(this.getTextPart()) == false) return false; if (other.getHtmlPart() == null ^ this.getHtmlPart() == null) return false; if (other.getHtmlPart() != null && other.getHtmlPart().equals(this.getHtmlPart()) == false) return false; return true; }
public Template unmarshall(StaxUnmarshallerContext context) throws Exception { Template template = new Template(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; template.setTemplateName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; template.setSubjectPart(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; template.setTextPart(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; template.setHtmlPart(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue;
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTemplate() == null) ? 0 : getTemplate().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateTemplateRequest == false) return false; UpdateTemplateRequest other = (UpdateTemplateRequest) obj; if (other.getTemplate() == null ^ this.getTemplate() == null) return false; if (other.getTemplate() != null && other.getTemplate().equals(this.getTemplate()) == false) return false; return true; }
/** * <p> * The HTML body of the email. * </p> * * @param htmlPart * The HTML body of the email. * @return Returns a reference to this object so that method calls can be chained together. */ public Template withHtmlPart(String htmlPart) { setHtmlPart(htmlPart); 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 (getTemplateName() != null) sb.append("TemplateName: ").append(getTemplateName()).append(","); if (getSubjectPart() != null) sb.append("SubjectPart: ").append(getSubjectPart()).append(","); if (getTextPart() != null) sb.append("TextPart: ").append(getTextPart()).append(","); if (getHtmlPart() != null) sb.append("HtmlPart: ").append(getHtmlPart()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTemplate() == null) ? 0 : getTemplate().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetTemplateResult == false) return false; GetTemplateResult other = (GetTemplateResult) obj; if (other.getTemplate() == null ^ this.getTemplate() == null) return false; if (other.getTemplate() != null && other.getTemplate().equals(this.getTemplate()) == false) return false; return true; } }
public Request<CreateTemplateRequest> marshall(CreateTemplateRequest createTemplateRequest) { if (createTemplateRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<CreateTemplateRequest> request = new DefaultRequest<CreateTemplateRequest>(createTemplateRequest, "AmazonSimpleEmailService"); request.addParameter("Action", "CreateTemplate"); request.addParameter("Version", "2010-12-01"); request.setHttpMethod(HttpMethodName.POST); { Template template = createTemplateRequest.getTemplate(); if (template != null) { if (template.getTemplateName() != null) { request.addParameter("Template.TemplateName", StringUtils.fromString(template.getTemplateName())); } if (template.getSubjectPart() != null) { request.addParameter("Template.SubjectPart", StringUtils.fromString(template.getSubjectPart())); } if (template.getTextPart() != null) { request.addParameter("Template.TextPart", StringUtils.fromString(template.getTextPart())); } if (template.getHtmlPart() != null) { request.addParameter("Template.HtmlPart", StringUtils.fromString(template.getHtmlPart())); } } } return request; }