package com.prowidesoftware.swift.model.mx; import com.prowidesoftware.swift.model.MxSwiftMessage; import com.prowidesoftware.swift.model.mx.dic.*; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import javax.xml.bind.annotation.*; /** * Class for seev.038.001.05 ISO 20022 message. * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Document", propOrder = { "corpActnNrrtv" }) @XmlRootElement(name = "Document", namespace = "urn:iso:std:iso:20022:tech:xsd:seev.038.001.05") public class MxSeev03800105 extends AbstractMX { @XmlElement(name = "CorpActnNrrtv", required = true) protected CorporateActionNarrativeV05 corpActnNrrtv; public final static transient String BUSINESS_PROCESS = "seev"; public final static transient int FUNCTIONALITY = 38; public final static transient int VARIANT = 1; public final static transient int VERSION = 5; @SuppressWarnings("rawtypes") public final static transient Class[] _classes = new Class[] {AccountIdentification10 .class, AccountIdentification42Choice.class, AccountIdentification47 .class, BalanceFormat5Choice.class, CorporateActionGeneralInformation92 .class, CorporateActionNarrative1Code.class, CorporateActionNarrative3Choice.class, CorporateActionNarrativeV05 .class, FinancialInstrumentQuantity1Choice.class, GenericIdentification30 .class, GenericIdentification36 .class, GenericIdentification78 .class, IdentificationSource3Choice.class, MxSeev03800105 .class, OtherIdentification1 .class, PartyIdentification127Choice.class, ProprietaryQuantity8 .class, Quantity19Choice.class, SafekeepingAccountIdentification1Code.class, SafekeepingPlace1Code.class, SafekeepingPlace2Code.class, SafekeepingPlaceFormat28Choice.class, SafekeepingPlaceTypeAndIdentification1 .class, SafekeepingPlaceTypeAndText6 .class, SecurityIdentification19 .class, ShortLong1Code.class, SignedQuantityFormat6 .class, SignedQuantityFormat7 .class, SupplementaryData1 .class, SupplementaryDataEnvelope1 .class, UpdatedAdditionalInformation8 .class }; public final static transient String NAMESPACE = "urn:iso:std:iso:20022:tech:xsd:seev.038.001.05"; public MxSeev03800105() { super(); } /** * Creates the MX object parsing the parameter String with the XML content * */ public MxSeev03800105(final String xml) { this(); MxSeev03800105 tmp = parse(xml); corpActnNrrtv = tmp.getCorpActnNrrtv(); } /** * Creates the MX object parsing the raw content from the parameter MxSwiftMessage * */ public MxSeev03800105(final MxSwiftMessage mxSwiftMessage) { this(mxSwiftMessage.message()); } /** * Gets the value of the corpActnNrrtv property. * * @return * possible object is * {@link CorporateActionNarrativeV05 } * */ public CorporateActionNarrativeV05 getCorpActnNrrtv() { return corpActnNrrtv; } /** * Sets the value of the corpActnNrrtv property. * * @param value * allowed object is * {@link CorporateActionNarrativeV05 } * */ public MxSeev03800105 setCorpActnNrrtv(CorporateActionNarrativeV05 value) { this.corpActnNrrtv = value; return this; } @Override public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); } @Override public boolean equals(Object that) { return EqualsBuilder.reflectionEquals(this, that); } @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } @Override public String getBusinessProcess() { return BUSINESS_PROCESS; } @Override public int getFunctionality() { return FUNCTIONALITY; } @Override public int getVariant() { return VARIANT; } @Override public int getVersion() { return VERSION; } /** * Creates the MX object parsing the raw content from the parameter XML * */ public static MxSeev03800105 parse(String xml) { return ((MxSeev03800105) MxReadImpl.parse(MxSeev03800105 .class, xml, _classes)); } /** * Creates the MX object parsing the raw content from the parameter XML with injected read implementation * @since 9.0.1 * * @param parserImpl an MX unmarshall implementation */ public static MxSeev03800105 parse(String xml, MxRead parserImpl) { return ((MxSeev03800105) parserImpl.read(MxSeev03800105 .class, xml, _classes)); } @Override public String getNamespace() { return NAMESPACE; } @Override @SuppressWarnings("rawtypes") public Class[] getClasses() { return _classes; } /** * Creates an MxSeev03800105 messages from its JSON representation. * <p> * For generic conversion of JSON into the corresponding MX instance * see {@link AbstractMX#fromJson(String)} * * @since 7.10.2 * * @param json a JSON representation of an MxSeev03800105 message * @return * a new instance of MxSeev03800105 */ public final static MxSeev03800105 fromJson(String json) { return AbstractMX.fromJson(json, MxSeev03800105 .class); } }