org.finra.herd.model.api.xml.EmailSendRequest Maven / Gradle / Ivy
package org.finra.herd.model.api.xml;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.CopyStrategy2;
import org.jvnet.jaxb2_commons.lang.CopyTo2;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.HashCode2;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
* Java class for emailSendRequest complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="emailSendRequest">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <all>
* <element name="to" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="cc" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="bcc" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="subject" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="text" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="replyTo" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="source" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </all>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "emailSendRequest", propOrder = {
})
@XmlRootElement(name = "emailSendRequest")
public class EmailSendRequest implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, ToString2
{
private final static long serialVersionUID = -1L;
protected String to;
protected String cc;
protected String bcc;
@XmlElement(required = true)
protected String subject;
protected String text;
protected String replyTo;
protected String source;
/**
* Default no-arg constructor
*
*/
public EmailSendRequest() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public EmailSendRequest(final String to, final String cc, final String bcc, final String subject, final String text, final String replyTo, final String source) {
this.to = to;
this.cc = cc;
this.bcc = bcc;
this.subject = subject;
this.text = text;
this.replyTo = replyTo;
this.source = source;
}
/**
* Gets the value of the to property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTo() {
return to;
}
/**
* Sets the value of the to property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTo(String value) {
this.to = value;
}
/**
* Gets the value of the cc property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCc() {
return cc;
}
/**
* Sets the value of the cc property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCc(String value) {
this.cc = value;
}
/**
* Gets the value of the bcc property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getBcc() {
return bcc;
}
/**
* Sets the value of the bcc property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setBcc(String value) {
this.bcc = value;
}
/**
* Gets the value of the subject property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSubject() {
return subject;
}
/**
* Sets the value of the subject property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSubject(String value) {
this.subject = value;
}
/**
* Gets the value of the text property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getText() {
return text;
}
/**
* Sets the value of the text property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setText(String value) {
this.text = value;
}
/**
* Gets the value of the replyTo property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getReplyTo() {
return replyTo;
}
/**
* Sets the value of the replyTo property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setReplyTo(String value) {
this.replyTo = value;
}
/**
* Gets the value of the source property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSource() {
return source;
}
/**
* Sets the value of the source property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSource(String value) {
this.source = value;
}
public String toString() {
final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
{
String theTo;
theTo = this.getTo();
strategy.appendField(locator, this, "to", buffer, theTo, (this.to!= null));
}
{
String theCc;
theCc = this.getCc();
strategy.appendField(locator, this, "cc", buffer, theCc, (this.cc!= null));
}
{
String theBcc;
theBcc = this.getBcc();
strategy.appendField(locator, this, "bcc", buffer, theBcc, (this.bcc!= null));
}
{
String theSubject;
theSubject = this.getSubject();
strategy.appendField(locator, this, "subject", buffer, theSubject, (this.subject!= null));
}
{
String theText;
theText = this.getText();
strategy.appendField(locator, this, "text", buffer, theText, (this.text!= null));
}
{
String theReplyTo;
theReplyTo = this.getReplyTo();
strategy.appendField(locator, this, "replyTo", buffer, theReplyTo, (this.replyTo!= null));
}
{
String theSource;
theSource = this.getSource();
strategy.appendField(locator, this, "source", buffer, theSource, (this.source!= null));
}
return buffer;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final EmailSendRequest that = ((EmailSendRequest) object);
{
String lhsTo;
lhsTo = this.getTo();
String rhsTo;
rhsTo = that.getTo();
if (!strategy.equals(LocatorUtils.property(thisLocator, "to", lhsTo), LocatorUtils.property(thatLocator, "to", rhsTo), lhsTo, rhsTo, (this.to!= null), (that.to!= null))) {
return false;
}
}
{
String lhsCc;
lhsCc = this.getCc();
String rhsCc;
rhsCc = that.getCc();
if (!strategy.equals(LocatorUtils.property(thisLocator, "cc", lhsCc), LocatorUtils.property(thatLocator, "cc", rhsCc), lhsCc, rhsCc, (this.cc!= null), (that.cc!= null))) {
return false;
}
}
{
String lhsBcc;
lhsBcc = this.getBcc();
String rhsBcc;
rhsBcc = that.getBcc();
if (!strategy.equals(LocatorUtils.property(thisLocator, "bcc", lhsBcc), LocatorUtils.property(thatLocator, "bcc", rhsBcc), lhsBcc, rhsBcc, (this.bcc!= null), (that.bcc!= null))) {
return false;
}
}
{
String lhsSubject;
lhsSubject = this.getSubject();
String rhsSubject;
rhsSubject = that.getSubject();
if (!strategy.equals(LocatorUtils.property(thisLocator, "subject", lhsSubject), LocatorUtils.property(thatLocator, "subject", rhsSubject), lhsSubject, rhsSubject, (this.subject!= null), (that.subject!= null))) {
return false;
}
}
{
String lhsText;
lhsText = this.getText();
String rhsText;
rhsText = that.getText();
if (!strategy.equals(LocatorUtils.property(thisLocator, "text", lhsText), LocatorUtils.property(thatLocator, "text", rhsText), lhsText, rhsText, (this.text!= null), (that.text!= null))) {
return false;
}
}
{
String lhsReplyTo;
lhsReplyTo = this.getReplyTo();
String rhsReplyTo;
rhsReplyTo = that.getReplyTo();
if (!strategy.equals(LocatorUtils.property(thisLocator, "replyTo", lhsReplyTo), LocatorUtils.property(thatLocator, "replyTo", rhsReplyTo), lhsReplyTo, rhsReplyTo, (this.replyTo!= null), (that.replyTo!= null))) {
return false;
}
}
{
String lhsSource;
lhsSource = this.getSource();
String rhsSource;
rhsSource = that.getSource();
if (!strategy.equals(LocatorUtils.property(thisLocator, "source", lhsSource), LocatorUtils.property(thatLocator, "source", rhsSource), lhsSource, rhsSource, (this.source!= null), (that.source!= null))) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) {
int currentHashCode = 1;
{
String theTo;
theTo = this.getTo();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "to", theTo), currentHashCode, theTo, (this.to!= null));
}
{
String theCc;
theCc = this.getCc();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "cc", theCc), currentHashCode, theCc, (this.cc!= null));
}
{
String theBcc;
theBcc = this.getBcc();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "bcc", theBcc), currentHashCode, theBcc, (this.bcc!= null));
}
{
String theSubject;
theSubject = this.getSubject();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "subject", theSubject), currentHashCode, theSubject, (this.subject!= null));
}
{
String theText;
theText = this.getText();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "text", theText), currentHashCode, theText, (this.text!= null));
}
{
String theReplyTo;
theReplyTo = this.getReplyTo();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "replyTo", theReplyTo), currentHashCode, theReplyTo, (this.replyTo!= null));
}
{
String theSource;
theSource = this.getSource();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "source", theSource), currentHashCode, theSource, (this.source!= null));
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
public Object clone() {
return copyTo(createNewInstance());
}
public Object copyTo(Object target) {
final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE;
return copyTo(null, target, strategy);
}
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
if (draftCopy instanceof EmailSendRequest) {
final EmailSendRequest copy = ((EmailSendRequest) draftCopy);
{
Boolean toShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.to!= null));
if (toShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceTo;
sourceTo = this.getTo();
String copyTo = ((String) strategy.copy(LocatorUtils.property(locator, "to", sourceTo), sourceTo, (this.to!= null)));
copy.setTo(copyTo);
} else {
if (toShouldBeCopiedAndSet == Boolean.FALSE) {
copy.to = null;
}
}
}
{
Boolean ccShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.cc!= null));
if (ccShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceCc;
sourceCc = this.getCc();
String copyCc = ((String) strategy.copy(LocatorUtils.property(locator, "cc", sourceCc), sourceCc, (this.cc!= null)));
copy.setCc(copyCc);
} else {
if (ccShouldBeCopiedAndSet == Boolean.FALSE) {
copy.cc = null;
}
}
}
{
Boolean bccShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.bcc!= null));
if (bccShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceBcc;
sourceBcc = this.getBcc();
String copyBcc = ((String) strategy.copy(LocatorUtils.property(locator, "bcc", sourceBcc), sourceBcc, (this.bcc!= null)));
copy.setBcc(copyBcc);
} else {
if (bccShouldBeCopiedAndSet == Boolean.FALSE) {
copy.bcc = null;
}
}
}
{
Boolean subjectShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.subject!= null));
if (subjectShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceSubject;
sourceSubject = this.getSubject();
String copySubject = ((String) strategy.copy(LocatorUtils.property(locator, "subject", sourceSubject), sourceSubject, (this.subject!= null)));
copy.setSubject(copySubject);
} else {
if (subjectShouldBeCopiedAndSet == Boolean.FALSE) {
copy.subject = null;
}
}
}
{
Boolean textShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.text!= null));
if (textShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceText;
sourceText = this.getText();
String copyText = ((String) strategy.copy(LocatorUtils.property(locator, "text", sourceText), sourceText, (this.text!= null)));
copy.setText(copyText);
} else {
if (textShouldBeCopiedAndSet == Boolean.FALSE) {
copy.text = null;
}
}
}
{
Boolean replyToShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.replyTo!= null));
if (replyToShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceReplyTo;
sourceReplyTo = this.getReplyTo();
String copyReplyTo = ((String) strategy.copy(LocatorUtils.property(locator, "replyTo", sourceReplyTo), sourceReplyTo, (this.replyTo!= null)));
copy.setReplyTo(copyReplyTo);
} else {
if (replyToShouldBeCopiedAndSet == Boolean.FALSE) {
copy.replyTo = null;
}
}
}
{
Boolean sourceShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.source!= null));
if (sourceShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceSource;
sourceSource = this.getSource();
String copySource = ((String) strategy.copy(LocatorUtils.property(locator, "source", sourceSource), sourceSource, (this.source!= null)));
copy.setSource(copySource);
} else {
if (sourceShouldBeCopiedAndSet == Boolean.FALSE) {
copy.source = null;
}
}
}
}
return draftCopy;
}
public Object createNewInstance() {
return new EmailSendRequest();
}
}