no.digipost.org.oasis_open.docs.ebxml_msg.ebms.v3_0.ns.core._200704.MessageInfo Maven / Gradle / Ivy
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0
// See https://javaee.github.io/jaxb-v2/
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2021.12.01 at 12:54:39 PM UTC
//
package no.digipost.org.oasis_open.docs.ebxml_msg.ebms.v3_0.ns.core._200704;
import java.time.ZonedDateTime;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import no.digipost.xsd.jaxb.XSDateTimeAdapter;
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.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 MessageInfo complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="MessageInfo">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Timestamp" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
* <element name="MessageId" type="{http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/}non-empty-string"/>
* <element name="RefToMessageId" type="{http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/}non-empty-string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MessageInfo", propOrder = {
"timestamp",
"messageId",
"refToMessageId"
})
public class MessageInfo implements Equals2, HashCode2, ToString2
{
@XmlElement(name = "Timestamp", required = true, type = String.class)
@XmlJavaTypeAdapter(XSDateTimeAdapter.class)
@XmlSchemaType(name = "dateTime")
protected ZonedDateTime timestamp;
@XmlElement(name = "MessageId", required = true)
protected String messageId;
@XmlElement(name = "RefToMessageId")
protected String refToMessageId;
/**
* Default no-arg constructor
*
*/
public MessageInfo() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public MessageInfo(final ZonedDateTime timestamp, final String messageId, final String refToMessageId) {
this.timestamp = timestamp;
this.messageId = messageId;
this.refToMessageId = refToMessageId;
}
/**
* Gets the value of the timestamp property.
*
* @return
* possible object is
* {@link String }
*
*/
public ZonedDateTime getTimestamp() {
return timestamp;
}
/**
* Sets the value of the timestamp property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTimestamp(ZonedDateTime value) {
this.timestamp = value;
}
/**
* Gets the value of the messageId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMessageId() {
return messageId;
}
/**
* Sets the value of the messageId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMessageId(String value) {
this.messageId = value;
}
/**
* Gets the value of the refToMessageId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRefToMessageId() {
return refToMessageId;
}
/**
* Sets the value of the refToMessageId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRefToMessageId(String value) {
this.refToMessageId = value;
}
public String toString() {
final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE2;
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) {
{
ZonedDateTime theTimestamp;
theTimestamp = this.getTimestamp();
strategy.appendField(locator, this, "timestamp", buffer, theTimestamp, (this.timestamp!= null));
}
{
String theMessageId;
theMessageId = this.getMessageId();
strategy.appendField(locator, this, "messageId", buffer, theMessageId, (this.messageId!= null));
}
{
String theRefToMessageId;
theRefToMessageId = this.getRefToMessageId();
strategy.appendField(locator, this, "refToMessageId", buffer, theRefToMessageId, (this.refToMessageId!= 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 MessageInfo that = ((MessageInfo) object);
{
ZonedDateTime lhsTimestamp;
lhsTimestamp = this.getTimestamp();
ZonedDateTime rhsTimestamp;
rhsTimestamp = that.getTimestamp();
if (!strategy.equals(LocatorUtils.property(thisLocator, "timestamp", lhsTimestamp), LocatorUtils.property(thatLocator, "timestamp", rhsTimestamp), lhsTimestamp, rhsTimestamp, (this.timestamp!= null), (that.timestamp!= null))) {
return false;
}
}
{
String lhsMessageId;
lhsMessageId = this.getMessageId();
String rhsMessageId;
rhsMessageId = that.getMessageId();
if (!strategy.equals(LocatorUtils.property(thisLocator, "messageId", lhsMessageId), LocatorUtils.property(thatLocator, "messageId", rhsMessageId), lhsMessageId, rhsMessageId, (this.messageId!= null), (that.messageId!= null))) {
return false;
}
}
{
String lhsRefToMessageId;
lhsRefToMessageId = this.getRefToMessageId();
String rhsRefToMessageId;
rhsRefToMessageId = that.getRefToMessageId();
if (!strategy.equals(LocatorUtils.property(thisLocator, "refToMessageId", lhsRefToMessageId), LocatorUtils.property(thatLocator, "refToMessageId", rhsRefToMessageId), lhsRefToMessageId, rhsRefToMessageId, (this.refToMessageId!= null), (that.refToMessageId!= null))) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE2;
return equals(null, null, object, strategy);
}
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) {
int currentHashCode = 1;
{
ZonedDateTime theTimestamp;
theTimestamp = this.getTimestamp();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "timestamp", theTimestamp), currentHashCode, theTimestamp, (this.timestamp!= null));
}
{
String theMessageId;
theMessageId = this.getMessageId();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "messageId", theMessageId), currentHashCode, theMessageId, (this.messageId!= null));
}
{
String theRefToMessageId;
theRefToMessageId = this.getRefToMessageId();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "refToMessageId", theRefToMessageId), currentHashCode, theRefToMessageId, (this.refToMessageId!= null));
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.INSTANCE2;
return this.hashCode(null, strategy);
}
public MessageInfo withTimestamp(ZonedDateTime value) {
setTimestamp(value);
return this;
}
public MessageInfo withMessageId(String value) {
setMessageId(value);
return this;
}
public MessageInfo withRefToMessageId(String value) {
setRefToMessageId(value);
return this;
}
}