'' ------------------------------------------------------------------------------
''  <auto-generated>
''    Generated by Xsd2Code++. Version 4.4.0.7
''    <NameSpace>DEXPRE</NameSpace><Collection>List</Collection><codeType>VisualBasic</codeType><EnableDataBinding>False</EnableDataBinding><GenerateCloneMethod>False</GenerateCloneMethod><GenerateDataContracts>False</GenerateDataContracts><DataMemberNameArg>OnlyIfDifferent</DataMemberNameArg><DataMemberOnXmlIgnore>False</DataMemberOnXmlIgnore><CodeBaseTag>Net45</CodeBaseTag><InitializeFields>All</InitializeFields><GenerateUnusedComplexTypes>True</GenerateUnusedComplexTypes><GenerateUnusedSimpleTypes>True</GenerateUnusedSimpleTypes><GenerateXMLAttributes>True</GenerateXMLAttributes><OrderXMLAttrib>False</OrderXMLAttrib><EnableLazyLoading>False</EnableLazyLoading><VirtualProp>False</VirtualProp><PascalCase>False</PascalCase><AutomaticProperties>False</AutomaticProperties><PropNameSpecified>None</PropNameSpecified><PrivateFieldName>StartWithUnderscore</PrivateFieldName><PrivateFieldNamePrefix></PrivateFieldNamePrefix><EnableRestriction>False</EnableRestriction><RestrictionMaxLenght>False</RestrictionMaxLenght><RestrictionRegEx>False</RestrictionRegEx><RestrictionRange>False</RestrictionRange><ValidateProperty>False</ValidateProperty><ClassNamePrefix></ClassNamePrefix><ClassLevel>Public</ClassLevel><PartialClass>True</PartialClass><ClassesInSeparateFiles>False</ClassesInSeparateFiles><ClassesInSeparateFilesDir></ClassesInSeparateFilesDir><TrackingChangesEnable>False</TrackingChangesEnable><GenTrackingClasses>False</GenTrackingClasses><HidePrivateFieldInIDE>False</HidePrivateFieldInIDE><EnableSummaryComment>False</EnableSummaryComment><EnableAppInfoSettings>False</EnableAppInfoSettings><EnableExternalSchemasCache>False</EnableExternalSchemasCache><EnableDebug>False</EnableDebug><EnableWarn>True</EnableWarn><ExcludeImportedTypes>True</ExcludeImportedTypes><ExpandNesteadAttributeGroup>True</ExpandNesteadAttributeGroup><CleanupCode>False</CleanupCode><EnableXmlSerialization>True</EnableXmlSerialization><SerializeMethodName>Serialize</SerializeMethodName><DeserializeMethodName>Deserialize</DeserializeMethodName><SaveToFileMethodName>SaveToFile</SaveToFileMethodName><LoadFromFileMethodName>LoadFromFile</LoadFromFileMethodName><EnableEncoding>False</EnableEncoding><EnableXMLIndent>True</EnableXMLIndent><IndentChar>Indent2Space</IndentChar><NewLineAttr>False</NewLineAttr><OmitXML>False</OmitXML><Encoder>UTF8</Encoder><Serializer>XmlSerializer</Serializer><sspNullable>False</sspNullable><sspString>False</sspString><sspCollection>False</sspCollection><sspComplexType>False</sspComplexType><sspSimpleType>False</sspSimpleType><sspEnumType>False</sspEnumType><XmlSerializerEvent>False</XmlSerializerEvent><BaseClassName>EntityBase</BaseClassName><UseBaseClass>False</UseBaseClass><GenBaseClass>False</GenBaseClass><CustomUsings></CustomUsings><AttributesToExlude></AttributesToExlude>
''  </auto-generated>
'' ------------------------------------------------------------------------------
Imports System
Imports System.Diagnostics
Imports System.Xml.Serialization
Imports System.Collections
Imports System.Xml.Schema
Imports System.ComponentModel
Imports System.IO
Imports System.Text
Imports System.Xml
Imports System.Collections.Generic

Namespace DEXPRE

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True), _
     System.Xml.Serialization.XmlRootAttribute([Namespace]:="", IsNullable:=False)> _
    Partial Public Class DEXPRE

#Region "Private fields"
        Private _interchangeSender As DEXPREInterchangeSender

        Private _interchangeRecipient As DEXPREInterchangeRecipient

        Private _preparation As DEXPREPreparation

        Private _interchangeControlReference As String

        Private _messageGroup As DEXPREMessageGroup

        Private _messageReferenceNumber As DEXPREMessageReferenceNumber

        Private _messageType As DEXPREMessageType

        Private _messageIdentifier As String

        Private _header As DEXPREHeader

        Private _exportRefund As DEXPREExportRefund

        Private _exportCustomsOffice As DEXPREExportCustomsOffice

        Private _supplementaryDeclarationCustomsOffice As DEXPRESupplementaryDeclarationCustomsOffice

        Private _intendedExitCustomsOffice As DEXPREIntendedExitCustomsOffice

        Private _actualExitCustomsOffice As DEXPREActualExitCustomsOffice

        Private _transaction As DEXPRETransaction

        Private _specialFact As List(Of DEXPRESpecialFact)

        Private _itinerary As List(Of DEXPREItinerary)

        Private _seals As DEXPRESeals

        Private _exporter As DEXPREExporter

        Private _declarant As DEXPREDeclarant

        Private _representative As DEXPRERepresentative

        Private _contractor As DEXPREContractor

        Private _outwardProcessingOwner As DEXPREOutwardProcessingOwner

        Private _consignee As DEXPREConsignee

        Private _deliveryTerms As DEXPREDeliveryTerms

        Private _outwardProcessing As DEXPREOutwardProcessing

        Private _goodsItem As List(Of DEXPREGoodsItem)

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._goodsItem = New List(Of DEXPREGoodsItem)()
            Me._outwardProcessing = New DEXPREOutwardProcessing()
            Me._deliveryTerms = New DEXPREDeliveryTerms()
            Me._consignee = New DEXPREConsignee()
            Me._outwardProcessingOwner = New DEXPREOutwardProcessingOwner()
            Me._contractor = New DEXPREContractor()
            Me._representative = New DEXPRERepresentative()
            Me._declarant = New DEXPREDeclarant()
            Me._exporter = New DEXPREExporter()
            Me._seals = New DEXPRESeals()
            Me._itinerary = New List(Of DEXPREItinerary)()
            Me._specialFact = New List(Of DEXPRESpecialFact)()
            Me._transaction = New DEXPRETransaction()
            Me._actualExitCustomsOffice = New DEXPREActualExitCustomsOffice()
            Me._intendedExitCustomsOffice = New DEXPREIntendedExitCustomsOffice()
            Me._supplementaryDeclarationCustomsOffice = New DEXPRESupplementaryDeclarationCustomsOffice()
            Me._exportCustomsOffice = New DEXPREExportCustomsOffice()
            Me._exportRefund = New DEXPREExportRefund()
            Me._header = New DEXPREHeader()
            Me._preparation = New DEXPREPreparation()
            Me._interchangeRecipient = New DEXPREInterchangeRecipient()
            Me._interchangeSender = New DEXPREInterchangeSender()
        End Sub

        Public Property InterchangeSender() As DEXPREInterchangeSender
            Get
                Return Me._interchangeSender
            End Get
            Set(value As DEXPREInterchangeSender)
                Me._interchangeSender = Value
            End Set
        End Property

        Public Property InterchangeRecipient() As DEXPREInterchangeRecipient
            Get
                Return Me._interchangeRecipient
            End Get
            Set(value As DEXPREInterchangeRecipient)
                Me._interchangeRecipient = Value
            End Set
        End Property

        Public Property Preparation() As DEXPREPreparation
            Get
                Return Me._preparation
            End Get
            Set(value As DEXPREPreparation)
                Me._preparation = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property InterchangeControlReference() As String
            Get
                Return Me._interchangeControlReference
            End Get
            Set(value As String)
                Me._interchangeControlReference = Value
            End Set
        End Property

        Public Property MessageGroup() As DEXPREMessageGroup
            Get
                Return Me._messageGroup
            End Get
            Set(value As DEXPREMessageGroup)
                Me._messageGroup = Value
            End Set
        End Property

        Public Property MessageReferenceNumber() As DEXPREMessageReferenceNumber
            Get
                Return Me._messageReferenceNumber
            End Get
            Set(value As DEXPREMessageReferenceNumber)
                Me._messageReferenceNumber = Value
            End Set
        End Property

        Public Property MessageType() As DEXPREMessageType
            Get
                Return Me._messageType
            End Get
            Set(value As DEXPREMessageType)
                Me._messageType = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property MessageIdentifier() As String
            Get
                Return Me._messageIdentifier
            End Get
            Set(value As String)
                Me._messageIdentifier = Value
            End Set
        End Property

        Public Property Header() As DEXPREHeader
            Get
                Return Me._header
            End Get
            Set(value As DEXPREHeader)
                Me._header = Value
            End Set
        End Property

        Public Property ExportRefund() As DEXPREExportRefund
            Get
                Return Me._exportRefund
            End Get
            Set(value As DEXPREExportRefund)
                Me._exportRefund = Value
            End Set
        End Property

        Public Property ExportCustomsOffice() As DEXPREExportCustomsOffice
            Get
                Return Me._exportCustomsOffice
            End Get
            Set(value As DEXPREExportCustomsOffice)
                Me._exportCustomsOffice = Value
            End Set
        End Property

        Public Property SupplementaryDeclarationCustomsOffice() As DEXPRESupplementaryDeclarationCustomsOffice
            Get
                Return Me._supplementaryDeclarationCustomsOffice
            End Get
            Set(value As DEXPRESupplementaryDeclarationCustomsOffice)
                Me._supplementaryDeclarationCustomsOffice = Value
            End Set
        End Property

        Public Property IntendedExitCustomsOffice() As DEXPREIntendedExitCustomsOffice
            Get
                Return Me._intendedExitCustomsOffice
            End Get
            Set(value As DEXPREIntendedExitCustomsOffice)
                Me._intendedExitCustomsOffice = Value
            End Set
        End Property

        Public Property ActualExitCustomsOffice() As DEXPREActualExitCustomsOffice
            Get
                Return Me._actualExitCustomsOffice
            End Get
            Set(value As DEXPREActualExitCustomsOffice)
                Me._actualExitCustomsOffice = Value
            End Set
        End Property

        Public Property Transaction() As DEXPRETransaction
            Get
                Return Me._transaction
            End Get
            Set(value As DEXPRETransaction)
                Me._transaction = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute("SpecialFact")> _
        Public Property SpecialFact() As List(Of DEXPRESpecialFact)
            Get
                Return Me._specialFact
            End Get
            Set(value As List(Of DEXPRESpecialFact))
                Me._specialFact = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute("Itinerary")> _
        Public Property Itinerary() As List(Of DEXPREItinerary)
            Get
                Return Me._itinerary
            End Get
            Set(value As List(Of DEXPREItinerary))
                Me._itinerary = Value
            End Set
        End Property

        Public Property Seals() As DEXPRESeals
            Get
                Return Me._seals
            End Get
            Set(value As DEXPRESeals)
                Me._seals = Value
            End Set
        End Property

        Public Property Exporter() As DEXPREExporter
            Get
                Return Me._exporter
            End Get
            Set(value As DEXPREExporter)
                Me._exporter = Value
            End Set
        End Property

        Public Property Declarant() As DEXPREDeclarant
            Get
                Return Me._declarant
            End Get
            Set(value As DEXPREDeclarant)
                Me._declarant = Value
            End Set
        End Property

        Public Property Representative() As DEXPRERepresentative
            Get
                Return Me._representative
            End Get
            Set(value As DEXPRERepresentative)
                Me._representative = Value
            End Set
        End Property

        Public Property Contractor() As DEXPREContractor
            Get
                Return Me._contractor
            End Get
            Set(value As DEXPREContractor)
                Me._contractor = Value
            End Set
        End Property

        Public Property OutwardProcessingOwner() As DEXPREOutwardProcessingOwner
            Get
                Return Me._outwardProcessingOwner
            End Get
            Set(value As DEXPREOutwardProcessingOwner)
                Me._outwardProcessingOwner = Value
            End Set
        End Property

        Public Property Consignee() As DEXPREConsignee
            Get
                Return Me._consignee
            End Get
            Set(value As DEXPREConsignee)
                Me._consignee = Value
            End Set
        End Property

        Public Property DeliveryTerms() As DEXPREDeliveryTerms
            Get
                Return Me._deliveryTerms
            End Get
            Set(value As DEXPREDeliveryTerms)
                Me._deliveryTerms = Value
            End Set
        End Property

        Public Property OutwardProcessing() As DEXPREOutwardProcessing
            Get
                Return Me._outwardProcessing
            End Get
            Set(value As DEXPREOutwardProcessing)
                Me._outwardProcessing = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute("GoodsItem")> _
        Public Property GoodsItem() As List(Of DEXPREGoodsItem)
            Get
                Return Me._goodsItem
            End Get
            Set(value As List(Of DEXPREGoodsItem))
                Me._goodsItem = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPRE))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPRE object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPRE object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPRE object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPRE, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPRE)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPRE) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPRE
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPRE)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPRE
            Return CType(Serializer.Deserialize(s), DEXPRE)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPRE object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPRE object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPRE object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPRE, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPRE)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPRE) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPRE
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREInterchangeSender

#Region "Private fields"
        Private _identification As DEXPREInterchangeSenderIdentification

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._identification = New DEXPREInterchangeSenderIdentification()
        End Sub

        Public Property Identification() As DEXPREInterchangeSenderIdentification
            Get
                Return Me._identification
            End Get
            Set(value As DEXPREInterchangeSenderIdentification)
                Me._identification = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREInterchangeSender))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREInterchangeSender object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREInterchangeSender object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREInterchangeSender object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREInterchangeSender, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREInterchangeSender)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREInterchangeSender) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREInterchangeSender
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREInterchangeSender)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREInterchangeSender
            Return CType(Serializer.Deserialize(s), DEXPREInterchangeSender)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREInterchangeSender object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREInterchangeSender object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREInterchangeSender object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREInterchangeSender, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREInterchangeSender)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREInterchangeSender) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREInterchangeSender
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREInterchangeSenderIdentification

#Region "Private fields"
        Private _referenceNumber As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set(value As String)
                Me._referenceNumber = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREInterchangeSenderIdentification))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREInterchangeSenderIdentification object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREInterchangeSenderIdentification object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREInterchangeSenderIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREInterchangeSenderIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREInterchangeSenderIdentification)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREInterchangeSenderIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREInterchangeSenderIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREInterchangeSenderIdentification)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREInterchangeSenderIdentification
            Return CType(Serializer.Deserialize(s), DEXPREInterchangeSenderIdentification)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREInterchangeSenderIdentification object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREInterchangeSenderIdentification object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREInterchangeSenderIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREInterchangeSenderIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREInterchangeSenderIdentification)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREInterchangeSenderIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREInterchangeSenderIdentification
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREInterchangeRecipient

#Region "Private fields"
        Private _identification As DEXPREInterchangeRecipientIdentification

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._identification = New DEXPREInterchangeRecipientIdentification()
        End Sub

        Public Property Identification() As DEXPREInterchangeRecipientIdentification
            Get
                Return Me._identification
            End Get
            Set(value As DEXPREInterchangeRecipientIdentification)
                Me._identification = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREInterchangeRecipient))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREInterchangeRecipient object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREInterchangeRecipient object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREInterchangeRecipient object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREInterchangeRecipient, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREInterchangeRecipient)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREInterchangeRecipient) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREInterchangeRecipient
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREInterchangeRecipient)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREInterchangeRecipient
            Return CType(Serializer.Deserialize(s), DEXPREInterchangeRecipient)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREInterchangeRecipient object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREInterchangeRecipient object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREInterchangeRecipient object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREInterchangeRecipient, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREInterchangeRecipient)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREInterchangeRecipient) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREInterchangeRecipient
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREInterchangeRecipientIdentification

#Region "Private fields"
        Private _referenceNumber As String

        Private _subsidiaryNumber As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set(value As String)
                Me._referenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property SubsidiaryNumber() As String
            Get
                Return Me._subsidiaryNumber
            End Get
            Set(value As String)
                Me._subsidiaryNumber = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREInterchangeRecipientIdentification))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREInterchangeRecipientIdentification object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREInterchangeRecipientIdentification object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREInterchangeRecipientIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREInterchangeRecipientIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREInterchangeRecipientIdentification)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREInterchangeRecipientIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREInterchangeRecipientIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREInterchangeRecipientIdentification)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREInterchangeRecipientIdentification
            Return CType(Serializer.Deserialize(s), DEXPREInterchangeRecipientIdentification)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREInterchangeRecipientIdentification object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREInterchangeRecipientIdentification object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREInterchangeRecipientIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREInterchangeRecipientIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREInterchangeRecipientIdentification)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREInterchangeRecipientIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREInterchangeRecipientIdentification
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREPreparation

#Region "Private fields"
        Private _date As Date

        Private _time As Date

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="date")> _
        Public Property [Date]() As Date
            Get
                Return Me._date
            End Get
            Set(value As Date)
                Me._date = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="time")> _
        Public Property Time() As Date
            Get
                Return Me._time
            End Get
            Set(value As Date)
                Me._time = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREPreparation))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREPreparation object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREPreparation object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREPreparation object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREPreparation, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREPreparation)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREPreparation) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREPreparation
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREPreparation)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREPreparation
            Return CType(Serializer.Deserialize(s), DEXPREPreparation)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREPreparation object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREPreparation object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREPreparation object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREPreparation, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREPreparation)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREPreparation) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREPreparation
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREMessageGroup

        '''<remarks/>
        EXP
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREMessageReferenceNumber

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1")> _
        Item1
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREMessageType

        '''<remarks/>
        DEXPRE
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREHeader

#Region "Private fields"
        Private _declaration As DEXPREHeaderDeclaration

        Private _movementReferenceNumber As String

        Private _messageVersion As String

        Private _exportCountry As String

        Private _destinationCountry As String

        Private _receptionDateTime As Date

        Private _acceptanceDateTime As Date

        Private _issuingDateTime As Date

        Private _decisiveDate As Date

        Private _exitDate As Date

        Private _specificCircumstanceIndicator As String

        Private _transportChargesPaymentMethod As String

        Private _partyConstellation As DEXPREHeaderPartyConstellation

        Private _containerFlag As DEXPREHeaderContainerFlag

        Private _totalGrossMassMeasure As Decimal

        Private _registrationNumber As String

        Private _commercialReferenceNumber As String

        Private _referencedMessageIdentifier As String

        Private _localReferenceNumber As String

        Private _goodsItemQuantity As String

        Private _totalPackageQuantity As String

        Private _customsAuthorization As DEXPREHeaderCustomsAuthorization

        Private _inlandTransportMeans As DEXPREHeaderInlandTransportMeans

        Private _departureTransportMeans As DEXPREHeaderDepartureTransportMeans

        Private _borderTransportMeans As DEXPREHeaderBorderTransportMeans

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._borderTransportMeans = New DEXPREHeaderBorderTransportMeans()
            Me._departureTransportMeans = New DEXPREHeaderDepartureTransportMeans()
            Me._inlandTransportMeans = New DEXPREHeaderInlandTransportMeans()
            Me._customsAuthorization = New DEXPREHeaderCustomsAuthorization()
            Me._declaration = New DEXPREHeaderDeclaration()
        End Sub

        Public Property Declaration() As DEXPREHeaderDeclaration
            Get
                Return Me._declaration
            End Get
            Set(value As DEXPREHeaderDeclaration)
                Me._declaration = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property MovementReferenceNumber() As String
            Get
                Return Me._movementReferenceNumber
            End Get
            Set(value As String)
                Me._movementReferenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property MessageVersion() As String
            Get
                Return Me._messageVersion
            End Get
            Set(value As String)
                Me._messageVersion = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ExportCountry() As String
            Get
                Return Me._exportCountry
            End Get
            Set(value As String)
                Me._exportCountry = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property DestinationCountry() As String
            Get
                Return Me._destinationCountry
            End Get
            Set(value As String)
                Me._destinationCountry = Value
            End Set
        End Property

        Public Property ReceptionDateTime() As Date
            Get
                Return Me._receptionDateTime
            End Get
            Set(value As Date)
                Me._receptionDateTime = Value
            End Set
        End Property

        Public Property AcceptanceDateTime() As Date
            Get
                Return Me._acceptanceDateTime
            End Get
            Set(value As Date)
                Me._acceptanceDateTime = Value
            End Set
        End Property

        Public Property IssuingDateTime() As Date
            Get
                Return Me._issuingDateTime
            End Get
            Set(value As Date)
                Me._issuingDateTime = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="date")> _
        Public Property DecisiveDate() As Date
            Get
                Return Me._decisiveDate
            End Get
            Set(value As Date)
                Me._decisiveDate = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="date")> _
        Public Property ExitDate() As Date
            Get
                Return Me._exitDate
            End Get
            Set(value As Date)
                Me._exitDate = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property SpecificCircumstanceIndicator() As String
            Get
                Return Me._specificCircumstanceIndicator
            End Get
            Set(value As String)
                Me._specificCircumstanceIndicator = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property TransportChargesPaymentMethod() As String
            Get
                Return Me._transportChargesPaymentMethod
            End Get
            Set(value As String)
                Me._transportChargesPaymentMethod = Value
            End Set
        End Property

        Public Property PartyConstellation() As DEXPREHeaderPartyConstellation
            Get
                Return Me._partyConstellation
            End Get
            Set(value As DEXPREHeaderPartyConstellation)
                Me._partyConstellation = Value
            End Set
        End Property

        Public Property ContainerFlag() As DEXPREHeaderContainerFlag
            Get
                Return Me._containerFlag
            End Get
            Set(value As DEXPREHeaderContainerFlag)
                Me._containerFlag = Value
            End Set
        End Property

        Public Property TotalGrossMassMeasure() As Decimal
            Get
                Return Me._totalGrossMassMeasure
            End Get
            Set(value As Decimal)
                Me._totalGrossMassMeasure = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property RegistrationNumber() As String
            Get
                Return Me._registrationNumber
            End Get
            Set(value As String)
                Me._registrationNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property CommercialReferenceNumber() As String
            Get
                Return Me._commercialReferenceNumber
            End Get
            Set(value As String)
                Me._commercialReferenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ReferencedMessageIdentifier() As String
            Get
                Return Me._referencedMessageIdentifier
            End Get
            Set(value As String)
                Me._referencedMessageIdentifier = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property LocalReferenceNumber() As String
            Get
                Return Me._localReferenceNumber
            End Get
            Set(value As String)
                Me._localReferenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer")> _
        Public Property GoodsItemQuantity() As String
            Get
                Return Me._goodsItemQuantity
            End Get
            Set(value As String)
                Me._goodsItemQuantity = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer")> _
        Public Property TotalPackageQuantity() As String
            Get
                Return Me._totalPackageQuantity
            End Get
            Set(value As String)
                Me._totalPackageQuantity = Value
            End Set
        End Property

        Public Property CustomsAuthorization() As DEXPREHeaderCustomsAuthorization
            Get
                Return Me._customsAuthorization
            End Get
            Set(value As DEXPREHeaderCustomsAuthorization)
                Me._customsAuthorization = Value
            End Set
        End Property

        Public Property InlandTransportMeans() As DEXPREHeaderInlandTransportMeans
            Get
                Return Me._inlandTransportMeans
            End Get
            Set(value As DEXPREHeaderInlandTransportMeans)
                Me._inlandTransportMeans = Value
            End Set
        End Property

        Public Property DepartureTransportMeans() As DEXPREHeaderDepartureTransportMeans
            Get
                Return Me._departureTransportMeans
            End Get
            Set(value As DEXPREHeaderDepartureTransportMeans)
                Me._departureTransportMeans = Value
            End Set
        End Property

        Public Property BorderTransportMeans() As DEXPREHeaderBorderTransportMeans
            Get
                Return Me._borderTransportMeans
            End Get
            Set(value As DEXPREHeaderBorderTransportMeans)
                Me._borderTransportMeans = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREHeader))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREHeader object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREHeader object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREHeader object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREHeader, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREHeader)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREHeader) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREHeader
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREHeader)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREHeader
            Return CType(Serializer.Deserialize(s), DEXPREHeader)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREHeader object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREHeader object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREHeader object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREHeader, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREHeader)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREHeader) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREHeader
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREHeaderDeclaration

#Region "Private fields"
        Private _type As String

        Private _procedure As String

        Private _variant As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Type() As String
            Get
                Return Me._type
            End Get
            Set(value As String)
                Me._type = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Procedure() As String
            Get
                Return Me._procedure
            End Get
            Set(value As String)
                Me._procedure = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property [Variant]() As String
            Get
                Return Me._variant
            End Get
            Set(value As String)
                Me._variant = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREHeaderDeclaration))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREHeaderDeclaration object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREHeaderDeclaration object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREHeaderDeclaration object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREHeaderDeclaration, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREHeaderDeclaration)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREHeaderDeclaration) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREHeaderDeclaration
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREHeaderDeclaration)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREHeaderDeclaration
            Return CType(Serializer.Deserialize(s), DEXPREHeaderDeclaration)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREHeaderDeclaration object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREHeaderDeclaration object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREHeaderDeclaration object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREHeaderDeclaration, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREHeaderDeclaration)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREHeaderDeclaration) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREHeaderDeclaration
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREHeaderPartyConstellation

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0000")> _
        Item0000

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0001")> _
        Item0001

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0003")> _
        Item0003

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0010")> _
        Item0010

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0011")> _
        Item0011

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0013")> _
        Item0013

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0100")> _
        Item0100

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0101")> _
        Item0101

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0103")> _
        Item0103

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0110")> _
        Item0110

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0111")> _
        Item0111

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0113")> _
        Item0113

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1000")> _
        Item1000

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1001")> _
        Item1001

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1002")> _
        Item1002

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1003")> _
        Item1003

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1010")> _
        Item1010

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1011")> _
        Item1011

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1012")> _
        Item1012

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1013")> _
        Item1013

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1100")> _
        Item1100

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1101")> _
        Item1101

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1102")> _
        Item1102

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1103")> _
        Item1103

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1110")> _
        Item1110

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1111")> _
        Item1111

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1112")> _
        Item1112

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1113")> _
        Item1113
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREHeaderContainerFlag

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0")> _
        Item0

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1")> _
        Item1
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREHeaderCustomsAuthorization

#Region "Private fields"
        Private _localClearanceOutwardProcessing As String

        Private _outwardProcessing As String

        Private _trustedExporter As String

        Private _accreditedExporter As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property LocalClearanceOutwardProcessing() As String
            Get
                Return Me._localClearanceOutwardProcessing
            End Get
            Set(value As String)
                Me._localClearanceOutwardProcessing = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property OutwardProcessing() As String
            Get
                Return Me._outwardProcessing
            End Get
            Set(value As String)
                Me._outwardProcessing = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property TrustedExporter() As String
            Get
                Return Me._trustedExporter
            End Get
            Set(value As String)
                Me._trustedExporter = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property AccreditedExporter() As String
            Get
                Return Me._accreditedExporter
            End Get
            Set(value As String)
                Me._accreditedExporter = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREHeaderCustomsAuthorization))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREHeaderCustomsAuthorization object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREHeaderCustomsAuthorization object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREHeaderCustomsAuthorization object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREHeaderCustomsAuthorization, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREHeaderCustomsAuthorization)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREHeaderCustomsAuthorization) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREHeaderCustomsAuthorization
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREHeaderCustomsAuthorization)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREHeaderCustomsAuthorization
            Return CType(Serializer.Deserialize(s), DEXPREHeaderCustomsAuthorization)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREHeaderCustomsAuthorization object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREHeaderCustomsAuthorization object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREHeaderCustomsAuthorization object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREHeaderCustomsAuthorization, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREHeaderCustomsAuthorization)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREHeaderCustomsAuthorization) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREHeaderCustomsAuthorization
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREHeaderInlandTransportMeans

#Region "Private fields"
        Private _mode As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Mode() As String
            Get
                Return Me._mode
            End Get
            Set(value As String)
                Me._mode = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREHeaderInlandTransportMeans))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREHeaderInlandTransportMeans object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREHeaderInlandTransportMeans object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREHeaderInlandTransportMeans object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREHeaderInlandTransportMeans, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREHeaderInlandTransportMeans)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREHeaderInlandTransportMeans) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREHeaderInlandTransportMeans
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREHeaderInlandTransportMeans)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREHeaderInlandTransportMeans
            Return CType(Serializer.Deserialize(s), DEXPREHeaderInlandTransportMeans)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREHeaderInlandTransportMeans object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREHeaderInlandTransportMeans object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREHeaderInlandTransportMeans object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREHeaderInlandTransportMeans, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREHeaderInlandTransportMeans)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREHeaderInlandTransportMeans) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREHeaderInlandTransportMeans
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREHeaderDepartureTransportMeans

#Region "Private fields"
        Private _type As DEXPREHeaderDepartureTransportMeansType

        Private _identity As String

        Private _nationality As String

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Property Type() As DEXPREHeaderDepartureTransportMeansType
            Get
                Return Me._type
            End Get
            Set(value As DEXPREHeaderDepartureTransportMeansType)
                Me._type = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Identity() As String
            Get
                Return Me._identity
            End Get
            Set(value As String)
                Me._identity = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Nationality() As String
            Get
                Return Me._nationality
            End Get
            Set(value As String)
                Me._nationality = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREHeaderDepartureTransportMeans))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREHeaderDepartureTransportMeans object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREHeaderDepartureTransportMeans object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREHeaderDepartureTransportMeans object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREHeaderDepartureTransportMeans, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREHeaderDepartureTransportMeans)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREHeaderDepartureTransportMeans) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREHeaderDepartureTransportMeans
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREHeaderDepartureTransportMeans)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREHeaderDepartureTransportMeans
            Return CType(Serializer.Deserialize(s), DEXPREHeaderDepartureTransportMeans)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREHeaderDepartureTransportMeans object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREHeaderDepartureTransportMeans object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREHeaderDepartureTransportMeans object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREHeaderDepartureTransportMeans, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREHeaderDepartureTransportMeans)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREHeaderDepartureTransportMeans) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREHeaderDepartureTransportMeans
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREHeaderDepartureTransportMeansType

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("10")> _
        Item10

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("20")> _
        Item20

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("31")> _
        Item31

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("32")> _
        Item32

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("33")> _
        Item33

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("34")> _
        Item34

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("35")> _
        Item35

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("40")> _
        Item40

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("50")> _
        Item50

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("60")> _
        Item60

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("70")> _
        Item70
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREHeaderBorderTransportMeans

#Region "Private fields"
        Private _mode As String

        Private _type As DEXPREHeaderBorderTransportMeansType

        Private _identity As String

        Private _nationality As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Mode() As String
            Get
                Return Me._mode
            End Get
            Set(value As String)
                Me._mode = Value
            End Set
        End Property

        Public Property Type() As DEXPREHeaderBorderTransportMeansType
            Get
                Return Me._type
            End Get
            Set(value As DEXPREHeaderBorderTransportMeansType)
                Me._type = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Identity() As String
            Get
                Return Me._identity
            End Get
            Set(value As String)
                Me._identity = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Nationality() As String
            Get
                Return Me._nationality
            End Get
            Set(value As String)
                Me._nationality = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREHeaderBorderTransportMeans))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREHeaderBorderTransportMeans object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREHeaderBorderTransportMeans object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREHeaderBorderTransportMeans object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREHeaderBorderTransportMeans, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREHeaderBorderTransportMeans)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREHeaderBorderTransportMeans) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREHeaderBorderTransportMeans
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREHeaderBorderTransportMeans)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREHeaderBorderTransportMeans
            Return CType(Serializer.Deserialize(s), DEXPREHeaderBorderTransportMeans)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREHeaderBorderTransportMeans object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREHeaderBorderTransportMeans object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREHeaderBorderTransportMeans object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREHeaderBorderTransportMeans, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREHeaderBorderTransportMeans)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREHeaderBorderTransportMeans) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREHeaderBorderTransportMeans
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREHeaderBorderTransportMeansType

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("10")> _
        Item10

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("20")> _
        Item20

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("31")> _
        Item31

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("32")> _
        Item32

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("33")> _
        Item33

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("34")> _
        Item34

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("35")> _
        Item35

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("40")> _
        Item40

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("50")> _
        Item50

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("60")> _
        Item60

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("70")> _
        Item70
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREExportRefund

#Region "Private fields"
        Private _destinationCountry As String

        Private _statements As String

        Private _applicationType As DEXPREExportRefundApplicationType

        Private _paymentMethod As String

        Private _authorisedRecipient As String

        Private _guaranteeAccount As String

        Private _reservationFlag As DEXPREExportRefundReservationFlag

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property DestinationCountry() As String
            Get
                Return Me._destinationCountry
            End Get
            Set(value As String)
                Me._destinationCountry = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Statements() As String
            Get
                Return Me._statements
            End Get
            Set(value As String)
                Me._statements = Value
            End Set
        End Property

        Public Property ApplicationType() As DEXPREExportRefundApplicationType
            Get
                Return Me._applicationType
            End Get
            Set(value As DEXPREExportRefundApplicationType)
                Me._applicationType = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property PaymentMethod() As String
            Get
                Return Me._paymentMethod
            End Get
            Set(value As String)
                Me._paymentMethod = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property AuthorisedRecipient() As String
            Get
                Return Me._authorisedRecipient
            End Get
            Set(value As String)
                Me._authorisedRecipient = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property GuaranteeAccount() As String
            Get
                Return Me._guaranteeAccount
            End Get
            Set(value As String)
                Me._guaranteeAccount = Value
            End Set
        End Property

        Public Property ReservationFlag() As DEXPREExportRefundReservationFlag
            Get
                Return Me._reservationFlag
            End Get
            Set(value As DEXPREExportRefundReservationFlag)
                Me._reservationFlag = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREExportRefund))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREExportRefund object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREExportRefund object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREExportRefund object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREExportRefund, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREExportRefund)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREExportRefund) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREExportRefund
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREExportRefund)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREExportRefund
            Return CType(Serializer.Deserialize(s), DEXPREExportRefund)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREExportRefund object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREExportRefund object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREExportRefund object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREExportRefund, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREExportRefund)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREExportRefund) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREExportRefund
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREExportRefundApplicationType

        '''<remarks/>
        EG

        '''<remarks/>
        EV

        '''<remarks/>
        VR

        '''<remarks/>
        VV
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREExportRefundReservationFlag

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0")> _
        Item0

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1")> _
        Item1
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREExportCustomsOffice

#Region "Private fields"
        Private _referenceNumber As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set(value As String)
                Me._referenceNumber = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREExportCustomsOffice))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREExportCustomsOffice object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREExportCustomsOffice object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREExportCustomsOffice object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREExportCustomsOffice, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREExportCustomsOffice)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREExportCustomsOffice) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREExportCustomsOffice
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREExportCustomsOffice)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREExportCustomsOffice
            Return CType(Serializer.Deserialize(s), DEXPREExportCustomsOffice)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREExportCustomsOffice object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREExportCustomsOffice object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREExportCustomsOffice object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREExportCustomsOffice, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREExportCustomsOffice)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREExportCustomsOffice) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREExportCustomsOffice
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPRESupplementaryDeclarationCustomsOffice

#Region "Private fields"
        Private _referenceNumber As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set(value As String)
                Me._referenceNumber = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPRESupplementaryDeclarationCustomsOffice))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPRESupplementaryDeclarationCustomsOffice object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPRESupplementaryDeclarationCustomsOffice object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPRESupplementaryDeclarationCustomsOffice object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPRESupplementaryDeclarationCustomsOffice, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPRESupplementaryDeclarationCustomsOffice)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPRESupplementaryDeclarationCustomsOffice) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPRESupplementaryDeclarationCustomsOffice
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPRESupplementaryDeclarationCustomsOffice)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPRESupplementaryDeclarationCustomsOffice
            Return CType(Serializer.Deserialize(s), DEXPRESupplementaryDeclarationCustomsOffice)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPRESupplementaryDeclarationCustomsOffice object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPRESupplementaryDeclarationCustomsOffice object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPRESupplementaryDeclarationCustomsOffice object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPRESupplementaryDeclarationCustomsOffice, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPRESupplementaryDeclarationCustomsOffice)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPRESupplementaryDeclarationCustomsOffice) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPRESupplementaryDeclarationCustomsOffice
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREIntendedExitCustomsOffice

#Region "Private fields"
        Private _referenceNumber As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set(value As String)
                Me._referenceNumber = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREIntendedExitCustomsOffice))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREIntendedExitCustomsOffice object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREIntendedExitCustomsOffice object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREIntendedExitCustomsOffice object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREIntendedExitCustomsOffice, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREIntendedExitCustomsOffice)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREIntendedExitCustomsOffice) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREIntendedExitCustomsOffice
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREIntendedExitCustomsOffice)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREIntendedExitCustomsOffice
            Return CType(Serializer.Deserialize(s), DEXPREIntendedExitCustomsOffice)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREIntendedExitCustomsOffice object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREIntendedExitCustomsOffice object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREIntendedExitCustomsOffice object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREIntendedExitCustomsOffice, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREIntendedExitCustomsOffice)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREIntendedExitCustomsOffice) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREIntendedExitCustomsOffice
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREActualExitCustomsOffice

#Region "Private fields"
        Private _referenceNumber As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set(value As String)
                Me._referenceNumber = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREActualExitCustomsOffice))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREActualExitCustomsOffice object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREActualExitCustomsOffice object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREActualExitCustomsOffice object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREActualExitCustomsOffice, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREActualExitCustomsOffice)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREActualExitCustomsOffice) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREActualExitCustomsOffice
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREActualExitCustomsOffice)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREActualExitCustomsOffice
            Return CType(Serializer.Deserialize(s), DEXPREActualExitCustomsOffice)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREActualExitCustomsOffice object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREActualExitCustomsOffice object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREActualExitCustomsOffice object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREActualExitCustomsOffice, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREActualExitCustomsOffice)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREActualExitCustomsOffice) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREActualExitCustomsOffice
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPRETransaction

#Region "Private fields"
        Private _type As DEXPRETransactionType

        Private _invoiceAmount As Decimal

        Private _currency As String

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Property Type() As DEXPRETransactionType
            Get
                Return Me._type
            End Get
            Set(value As DEXPRETransactionType)
                Me._type = Value
            End Set
        End Property

        Public Property InvoiceAmount() As Decimal
            Get
                Return Me._invoiceAmount
            End Get
            Set(value As Decimal)
                Me._invoiceAmount = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Currency() As String
            Get
                Return Me._currency
            End Get
            Set(value As String)
                Me._currency = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPRETransaction))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPRETransaction object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPRETransaction object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPRETransaction object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPRETransaction, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPRETransaction)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPRETransaction) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPRETransaction
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPRETransaction)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPRETransaction
            Return CType(Serializer.Deserialize(s), DEXPRETransaction)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPRETransaction object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPRETransaction object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPRETransaction object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPRETransaction, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPRETransaction)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPRETransaction) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPRETransaction
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPRETransactionType

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("11")> _
        Item11

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("12")> _
        Item12

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("13")> _
        Item13

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("14")> _
        Item14

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("19")> _
        Item19

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("21")> _
        Item21

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("22")> _
        Item22

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("23")> _
        Item23

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("29")> _
        Item29

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("31")> _
        Item31

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("32")> _
        Item32

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("33")> _
        Item33

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("34")> _
        Item34

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("41")> _
        Item41

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("42")> _
        Item42

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("51")> _
        Item51

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("52")> _
        Item52

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("67")> _
        Item67

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("69")> _
        Item69

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("71")> _
        Item71

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("72")> _
        Item72

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("81")> _
        Item81

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("91")> _
        Item91

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("92")> _
        Item92

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("99")> _
        Item99
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPRESpecialFact

#Region "Private fields"
        Private _indicator As DEXPRESpecialFactIndicator

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Property Indicator() As DEXPRESpecialFactIndicator
            Get
                Return Me._indicator
            End Get
            Set(value As DEXPRESpecialFactIndicator)
                Me._indicator = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPRESpecialFact))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPRESpecialFact object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPRESpecialFact object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPRESpecialFact object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPRESpecialFact, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPRESpecialFact)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPRESpecialFact) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPRESpecialFact
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPRESpecialFact)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPRESpecialFact
            Return CType(Serializer.Deserialize(s), DEXPRESpecialFact)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPRESpecialFact object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPRESpecialFact object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPRESpecialFact object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPRESpecialFact, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPRESpecialFact)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPRESpecialFact) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPRESpecialFact
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPRESpecialFactIndicator

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0")> _
        Item0

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1")> _
        Item1

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("2")> _
        Item2

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("3")> _
        Item3

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("4")> _
        Item4

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("5")> _
        Item5
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREItinerary

#Region "Private fields"
        Private _country As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Country() As String
            Get
                Return Me._country
            End Get
            Set(value As String)
                Me._country = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREItinerary))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREItinerary object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREItinerary object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREItinerary object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREItinerary, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREItinerary)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREItinerary) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREItinerary
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREItinerary)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREItinerary
            Return CType(Serializer.Deserialize(s), DEXPREItinerary)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREItinerary object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREItinerary object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREItinerary object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREItinerary, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREItinerary)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREItinerary) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREItinerary
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPRESeals

#Region "Private fields"
        Private _type As DEXPRESealsType

        Private _number As String

        Private _seal As List(Of DEXPRESealsSeal)

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._seal = New List(Of DEXPRESealsSeal)()
        End Sub

        Public Property Type() As DEXPRESealsType
            Get
                Return Me._type
            End Get
            Set(value As DEXPRESealsType)
                Me._type = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer")> _
        Public Property Number() As String
            Get
                Return Me._number
            End Get
            Set(value As String)
                Me._number = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute("Seal")> _
        Public Property Seal() As List(Of DEXPRESealsSeal)
            Get
                Return Me._seal
            End Get
            Set(value As List(Of DEXPRESealsSeal))
                Me._seal = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPRESeals))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPRESeals object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPRESeals object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPRESeals object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPRESeals, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPRESeals)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPRESeals) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPRESeals
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPRESeals)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPRESeals
            Return CType(Serializer.Deserialize(s), DEXPRESeals)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPRESeals object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPRESeals object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPRESeals object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPRESeals, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPRESeals)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPRESeals) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPRESeals
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPRESealsType

        '''<remarks/>
        P

        '''<remarks/>
        R
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPRESealsSeal

#Region "Private fields"
        Private _identity As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Identity() As String
            Get
                Return Me._identity
            End Get
            Set(value As String)
                Me._identity = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPRESealsSeal))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPRESealsSeal object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPRESealsSeal object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPRESealsSeal object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPRESealsSeal, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPRESealsSeal)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPRESealsSeal) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPRESealsSeal
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPRESealsSeal)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPRESealsSeal
            Return CType(Serializer.Deserialize(s), DEXPRESealsSeal)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPRESealsSeal object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPRESealsSeal object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPRESealsSeal object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPRESealsSeal, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPRESealsSeal)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPRESealsSeal) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPRESealsSeal
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREExporter

#Region "Private fields"
        Private _class As DEXPREExporterClass

        Private _identification As DEXPREExporterIdentification

        Private _name As String

        Private _address As DEXPREExporterAddress

        Private _contactPerson As DEXPREExporterContactPerson

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._contactPerson = New DEXPREExporterContactPerson()
            Me._address = New DEXPREExporterAddress()
            Me._identification = New DEXPREExporterIdentification()
        End Sub

        Public Property [Class]() As DEXPREExporterClass
            Get
                Return Me._class
            End Get
            Set(value As DEXPREExporterClass)
                Me._class = Value
            End Set
        End Property

        Public Property Identification() As DEXPREExporterIdentification
            Get
                Return Me._identification
            End Get
            Set(value As DEXPREExporterIdentification)
                Me._identification = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set(value As String)
                Me._name = Value
            End Set
        End Property

        Public Property Address() As DEXPREExporterAddress
            Get
                Return Me._address
            End Get
            Set(value As DEXPREExporterAddress)
                Me._address = Value
            End Set
        End Property

        Public Property ContactPerson() As DEXPREExporterContactPerson
            Get
                Return Me._contactPerson
            End Get
            Set(value As DEXPREExporterContactPerson)
                Me._contactPerson = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREExporter))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREExporter object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREExporter object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREExporter object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREExporter, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREExporter)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREExporter) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREExporter
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREExporter)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREExporter
            Return CType(Serializer.Deserialize(s), DEXPREExporter)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREExporter object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREExporter object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREExporter object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREExporter, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREExporter)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREExporter) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREExporter
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREExporterClass

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0")> _
        Item0

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("2")> _
        Item2

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("3")> _
        Item3

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("4")> _
        Item4
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREExporterIdentification

#Region "Private fields"
        Private _referenceNumber As String

        Private _subsidiaryNumber As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set(value As String)
                Me._referenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property SubsidiaryNumber() As String
            Get
                Return Me._subsidiaryNumber
            End Get
            Set(value As String)
                Me._subsidiaryNumber = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREExporterIdentification))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREExporterIdentification object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREExporterIdentification object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREExporterIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREExporterIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREExporterIdentification)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREExporterIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREExporterIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREExporterIdentification)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREExporterIdentification
            Return CType(Serializer.Deserialize(s), DEXPREExporterIdentification)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREExporterIdentification object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREExporterIdentification object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREExporterIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREExporterIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREExporterIdentification)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREExporterIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREExporterIdentification
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREExporterAddress

#Region "Private fields"
        Private _line As String

        Private _city As String

        Private _postcode As String

        Private _country As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Line() As String
            Get
                Return Me._line
            End Get
            Set(value As String)
                Me._line = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property City() As String
            Get
                Return Me._city
            End Get
            Set(value As String)
                Me._city = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Postcode() As String
            Get
                Return Me._postcode
            End Get
            Set(value As String)
                Me._postcode = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Country() As String
            Get
                Return Me._country
            End Get
            Set(value As String)
                Me._country = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREExporterAddress))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREExporterAddress object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREExporterAddress object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREExporterAddress object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREExporterAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREExporterAddress)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREExporterAddress) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREExporterAddress
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREExporterAddress)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREExporterAddress
            Return CType(Serializer.Deserialize(s), DEXPREExporterAddress)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREExporterAddress object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREExporterAddress object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREExporterAddress object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREExporterAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREExporterAddress)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREExporterAddress) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREExporterAddress
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREExporterContactPerson

#Region "Private fields"
        Private _position As String

        Private _name As String

        Private _phoneNumber As String

        Private _facsimileNumber As String

        Private _mailAddress As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Position() As String
            Get
                Return Me._position
            End Get
            Set(value As String)
                Me._position = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set(value As String)
                Me._name = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property PhoneNumber() As String
            Get
                Return Me._phoneNumber
            End Get
            Set(value As String)
                Me._phoneNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property FacsimileNumber() As String
            Get
                Return Me._facsimileNumber
            End Get
            Set(value As String)
                Me._facsimileNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property MailAddress() As String
            Get
                Return Me._mailAddress
            End Get
            Set(value As String)
                Me._mailAddress = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREExporterContactPerson))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREExporterContactPerson object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREExporterContactPerson object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREExporterContactPerson object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREExporterContactPerson, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREExporterContactPerson)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREExporterContactPerson) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREExporterContactPerson
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREExporterContactPerson)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREExporterContactPerson
            Return CType(Serializer.Deserialize(s), DEXPREExporterContactPerson)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREExporterContactPerson object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREExporterContactPerson object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREExporterContactPerson object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREExporterContactPerson, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREExporterContactPerson)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREExporterContactPerson) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREExporterContactPerson
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREDeclarant

#Region "Private fields"
        Private _class As DEXPREDeclarantClass

        Private _identification As DEXPREDeclarantIdentification

        Private _name As String

        Private _address As DEXPREDeclarantAddress

        Private _contactPerson As DEXPREDeclarantContactPerson

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._contactPerson = New DEXPREDeclarantContactPerson()
            Me._address = New DEXPREDeclarantAddress()
            Me._identification = New DEXPREDeclarantIdentification()
        End Sub

        Public Property [Class]() As DEXPREDeclarantClass
            Get
                Return Me._class
            End Get
            Set(value As DEXPREDeclarantClass)
                Me._class = Value
            End Set
        End Property

        Public Property Identification() As DEXPREDeclarantIdentification
            Get
                Return Me._identification
            End Get
            Set(value As DEXPREDeclarantIdentification)
                Me._identification = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set(value As String)
                Me._name = Value
            End Set
        End Property

        Public Property Address() As DEXPREDeclarantAddress
            Get
                Return Me._address
            End Get
            Set(value As DEXPREDeclarantAddress)
                Me._address = Value
            End Set
        End Property

        Public Property ContactPerson() As DEXPREDeclarantContactPerson
            Get
                Return Me._contactPerson
            End Get
            Set(value As DEXPREDeclarantContactPerson)
                Me._contactPerson = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREDeclarant))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREDeclarant object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREDeclarant object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREDeclarant object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREDeclarant, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREDeclarant)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREDeclarant) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREDeclarant
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREDeclarant)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREDeclarant
            Return CType(Serializer.Deserialize(s), DEXPREDeclarant)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREDeclarant object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREDeclarant object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREDeclarant object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREDeclarant, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREDeclarant)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREDeclarant) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREDeclarant
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREDeclarantClass

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0")> _
        Item0

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("2")> _
        Item2

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("3")> _
        Item3
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREDeclarantIdentification

#Region "Private fields"
        Private _referenceNumber As String

        Private _subsidiaryNumber As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set(value As String)
                Me._referenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property SubsidiaryNumber() As String
            Get
                Return Me._subsidiaryNumber
            End Get
            Set(value As String)
                Me._subsidiaryNumber = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREDeclarantIdentification))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREDeclarantIdentification object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREDeclarantIdentification object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREDeclarantIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREDeclarantIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREDeclarantIdentification)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREDeclarantIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREDeclarantIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREDeclarantIdentification)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREDeclarantIdentification
            Return CType(Serializer.Deserialize(s), DEXPREDeclarantIdentification)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREDeclarantIdentification object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREDeclarantIdentification object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREDeclarantIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREDeclarantIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREDeclarantIdentification)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREDeclarantIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREDeclarantIdentification
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREDeclarantAddress

#Region "Private fields"
        Private _line As String

        Private _city As String

        Private _postcode As String

        Private _country As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Line() As String
            Get
                Return Me._line
            End Get
            Set(value As String)
                Me._line = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property City() As String
            Get
                Return Me._city
            End Get
            Set(value As String)
                Me._city = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Postcode() As String
            Get
                Return Me._postcode
            End Get
            Set(value As String)
                Me._postcode = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Country() As String
            Get
                Return Me._country
            End Get
            Set(value As String)
                Me._country = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREDeclarantAddress))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREDeclarantAddress object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREDeclarantAddress object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREDeclarantAddress object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREDeclarantAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREDeclarantAddress)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREDeclarantAddress) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREDeclarantAddress
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREDeclarantAddress)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREDeclarantAddress
            Return CType(Serializer.Deserialize(s), DEXPREDeclarantAddress)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREDeclarantAddress object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREDeclarantAddress object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREDeclarantAddress object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREDeclarantAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREDeclarantAddress)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREDeclarantAddress) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREDeclarantAddress
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREDeclarantContactPerson

#Region "Private fields"
        Private _position As String

        Private _name As String

        Private _phoneNumber As String

        Private _facsimileNumber As String

        Private _mailAddress As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Position() As String
            Get
                Return Me._position
            End Get
            Set(value As String)
                Me._position = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set(value As String)
                Me._name = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property PhoneNumber() As String
            Get
                Return Me._phoneNumber
            End Get
            Set(value As String)
                Me._phoneNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property FacsimileNumber() As String
            Get
                Return Me._facsimileNumber
            End Get
            Set(value As String)
                Me._facsimileNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property MailAddress() As String
            Get
                Return Me._mailAddress
            End Get
            Set(value As String)
                Me._mailAddress = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREDeclarantContactPerson))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREDeclarantContactPerson object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREDeclarantContactPerson object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREDeclarantContactPerson object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREDeclarantContactPerson, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREDeclarantContactPerson)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREDeclarantContactPerson) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREDeclarantContactPerson
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREDeclarantContactPerson)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREDeclarantContactPerson
            Return CType(Serializer.Deserialize(s), DEXPREDeclarantContactPerson)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREDeclarantContactPerson object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREDeclarantContactPerson object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREDeclarantContactPerson object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREDeclarantContactPerson, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREDeclarantContactPerson)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREDeclarantContactPerson) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREDeclarantContactPerson
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPRERepresentative

#Region "Private fields"
        Private _class As DEXPRERepresentativeClass

        Private _identification As DEXPRERepresentativeIdentification

        Private _name As String

        Private _address As DEXPRERepresentativeAddress

        Private _contactPerson As DEXPRERepresentativeContactPerson

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._contactPerson = New DEXPRERepresentativeContactPerson()
            Me._address = New DEXPRERepresentativeAddress()
            Me._identification = New DEXPRERepresentativeIdentification()
        End Sub

        Public Property [Class]() As DEXPRERepresentativeClass
            Get
                Return Me._class
            End Get
            Set(value As DEXPRERepresentativeClass)
                Me._class = Value
            End Set
        End Property

        Public Property Identification() As DEXPRERepresentativeIdentification
            Get
                Return Me._identification
            End Get
            Set(value As DEXPRERepresentativeIdentification)
                Me._identification = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set(value As String)
                Me._name = Value
            End Set
        End Property

        Public Property Address() As DEXPRERepresentativeAddress
            Get
                Return Me._address
            End Get
            Set(value As DEXPRERepresentativeAddress)
                Me._address = Value
            End Set
        End Property

        Public Property ContactPerson() As DEXPRERepresentativeContactPerson
            Get
                Return Me._contactPerson
            End Get
            Set(value As DEXPRERepresentativeContactPerson)
                Me._contactPerson = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPRERepresentative))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPRERepresentative object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPRERepresentative object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPRERepresentative object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPRERepresentative, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPRERepresentative)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPRERepresentative) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPRERepresentative
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPRERepresentative)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPRERepresentative
            Return CType(Serializer.Deserialize(s), DEXPRERepresentative)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPRERepresentative object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPRERepresentative object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPRERepresentative object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPRERepresentative, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPRERepresentative)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPRERepresentative) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPRERepresentative
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPRERepresentativeClass

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0")> _
        Item0

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("2")> _
        Item2

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("3")> _
        Item3
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPRERepresentativeIdentification

#Region "Private fields"
        Private _referenceNumber As String

        Private _subsidiaryNumber As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set(value As String)
                Me._referenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property SubsidiaryNumber() As String
            Get
                Return Me._subsidiaryNumber
            End Get
            Set(value As String)
                Me._subsidiaryNumber = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPRERepresentativeIdentification))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPRERepresentativeIdentification object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPRERepresentativeIdentification object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPRERepresentativeIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPRERepresentativeIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPRERepresentativeIdentification)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPRERepresentativeIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPRERepresentativeIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPRERepresentativeIdentification)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPRERepresentativeIdentification
            Return CType(Serializer.Deserialize(s), DEXPRERepresentativeIdentification)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPRERepresentativeIdentification object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPRERepresentativeIdentification object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPRERepresentativeIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPRERepresentativeIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPRERepresentativeIdentification)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPRERepresentativeIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPRERepresentativeIdentification
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPRERepresentativeAddress

#Region "Private fields"
        Private _line As String

        Private _city As String

        Private _postcode As String

        Private _country As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Line() As String
            Get
                Return Me._line
            End Get
            Set(value As String)
                Me._line = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property City() As String
            Get
                Return Me._city
            End Get
            Set(value As String)
                Me._city = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Postcode() As String
            Get
                Return Me._postcode
            End Get
            Set(value As String)
                Me._postcode = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Country() As String
            Get
                Return Me._country
            End Get
            Set(value As String)
                Me._country = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPRERepresentativeAddress))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPRERepresentativeAddress object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPRERepresentativeAddress object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPRERepresentativeAddress object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPRERepresentativeAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPRERepresentativeAddress)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPRERepresentativeAddress) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPRERepresentativeAddress
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPRERepresentativeAddress)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPRERepresentativeAddress
            Return CType(Serializer.Deserialize(s), DEXPRERepresentativeAddress)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPRERepresentativeAddress object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPRERepresentativeAddress object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPRERepresentativeAddress object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPRERepresentativeAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPRERepresentativeAddress)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPRERepresentativeAddress) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPRERepresentativeAddress
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPRERepresentativeContactPerson

#Region "Private fields"
        Private _position As String

        Private _name As String

        Private _phoneNumber As String

        Private _facsimileNumber As String

        Private _mailAddress As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Position() As String
            Get
                Return Me._position
            End Get
            Set(value As String)
                Me._position = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set(value As String)
                Me._name = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property PhoneNumber() As String
            Get
                Return Me._phoneNumber
            End Get
            Set(value As String)
                Me._phoneNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property FacsimileNumber() As String
            Get
                Return Me._facsimileNumber
            End Get
            Set(value As String)
                Me._facsimileNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property MailAddress() As String
            Get
                Return Me._mailAddress
            End Get
            Set(value As String)
                Me._mailAddress = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPRERepresentativeContactPerson))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPRERepresentativeContactPerson object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPRERepresentativeContactPerson object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPRERepresentativeContactPerson object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPRERepresentativeContactPerson, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPRERepresentativeContactPerson)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPRERepresentativeContactPerson) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPRERepresentativeContactPerson
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPRERepresentativeContactPerson)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPRERepresentativeContactPerson
            Return CType(Serializer.Deserialize(s), DEXPRERepresentativeContactPerson)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPRERepresentativeContactPerson object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPRERepresentativeContactPerson object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPRERepresentativeContactPerson object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPRERepresentativeContactPerson, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPRERepresentativeContactPerson)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPRERepresentativeContactPerson) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPRERepresentativeContactPerson
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREContractor

#Region "Private fields"
        Private _class As DEXPREContractorClass

        Private _identification As DEXPREContractorIdentification

        Private _name As String

        Private _address As DEXPREContractorAddress

        Private _contactPerson As DEXPREContractorContactPerson

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._contactPerson = New DEXPREContractorContactPerson()
            Me._address = New DEXPREContractorAddress()
            Me._identification = New DEXPREContractorIdentification()
        End Sub

        Public Property [Class]() As DEXPREContractorClass
            Get
                Return Me._class
            End Get
            Set(value As DEXPREContractorClass)
                Me._class = Value
            End Set
        End Property

        Public Property Identification() As DEXPREContractorIdentification
            Get
                Return Me._identification
            End Get
            Set(value As DEXPREContractorIdentification)
                Me._identification = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set(value As String)
                Me._name = Value
            End Set
        End Property

        Public Property Address() As DEXPREContractorAddress
            Get
                Return Me._address
            End Get
            Set(value As DEXPREContractorAddress)
                Me._address = Value
            End Set
        End Property

        Public Property ContactPerson() As DEXPREContractorContactPerson
            Get
                Return Me._contactPerson
            End Get
            Set(value As DEXPREContractorContactPerson)
                Me._contactPerson = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREContractor))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREContractor object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREContractor object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREContractor object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREContractor, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREContractor)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREContractor) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREContractor
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREContractor)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREContractor
            Return CType(Serializer.Deserialize(s), DEXPREContractor)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREContractor object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREContractor object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREContractor object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREContractor, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREContractor)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREContractor) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREContractor
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREContractorClass

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0")> _
        Item0

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("2")> _
        Item2

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("3")> _
        Item3
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREContractorIdentification

#Region "Private fields"
        Private _referenceNumber As String

        Private _subsidiaryNumber As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set(value As String)
                Me._referenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property SubsidiaryNumber() As String
            Get
                Return Me._subsidiaryNumber
            End Get
            Set(value As String)
                Me._subsidiaryNumber = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREContractorIdentification))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREContractorIdentification object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREContractorIdentification object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREContractorIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREContractorIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREContractorIdentification)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREContractorIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREContractorIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREContractorIdentification)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREContractorIdentification
            Return CType(Serializer.Deserialize(s), DEXPREContractorIdentification)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREContractorIdentification object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREContractorIdentification object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREContractorIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREContractorIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREContractorIdentification)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREContractorIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREContractorIdentification
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREContractorAddress

#Region "Private fields"
        Private _line As String

        Private _city As String

        Private _postcode As String

        Private _country As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Line() As String
            Get
                Return Me._line
            End Get
            Set(value As String)
                Me._line = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property City() As String
            Get
                Return Me._city
            End Get
            Set(value As String)
                Me._city = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Postcode() As String
            Get
                Return Me._postcode
            End Get
            Set(value As String)
                Me._postcode = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Country() As String
            Get
                Return Me._country
            End Get
            Set(value As String)
                Me._country = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREContractorAddress))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREContractorAddress object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREContractorAddress object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREContractorAddress object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREContractorAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREContractorAddress)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREContractorAddress) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREContractorAddress
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREContractorAddress)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREContractorAddress
            Return CType(Serializer.Deserialize(s), DEXPREContractorAddress)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREContractorAddress object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREContractorAddress object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREContractorAddress object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREContractorAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREContractorAddress)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREContractorAddress) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREContractorAddress
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREContractorContactPerson

#Region "Private fields"
        Private _position As String

        Private _name As String

        Private _phoneNumber As String

        Private _facsimileNumber As String

        Private _mailAddress As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Position() As String
            Get
                Return Me._position
            End Get
            Set(value As String)
                Me._position = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set(value As String)
                Me._name = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property PhoneNumber() As String
            Get
                Return Me._phoneNumber
            End Get
            Set(value As String)
                Me._phoneNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property FacsimileNumber() As String
            Get
                Return Me._facsimileNumber
            End Get
            Set(value As String)
                Me._facsimileNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property MailAddress() As String
            Get
                Return Me._mailAddress
            End Get
            Set(value As String)
                Me._mailAddress = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREContractorContactPerson))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREContractorContactPerson object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREContractorContactPerson object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREContractorContactPerson object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREContractorContactPerson, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREContractorContactPerson)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREContractorContactPerson) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREContractorContactPerson
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREContractorContactPerson)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREContractorContactPerson
            Return CType(Serializer.Deserialize(s), DEXPREContractorContactPerson)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREContractorContactPerson object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREContractorContactPerson object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREContractorContactPerson object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREContractorContactPerson, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREContractorContactPerson)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREContractorContactPerson) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREContractorContactPerson
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREOutwardProcessingOwner

#Region "Private fields"
        Private _class As DEXPREOutwardProcessingOwnerClass

        Private _identification As DEXPREOutwardProcessingOwnerIdentification

        Private _name As String

        Private _address As DEXPREOutwardProcessingOwnerAddress

        Private _contactPerson As DEXPREOutwardProcessingOwnerContactPerson

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._contactPerson = New DEXPREOutwardProcessingOwnerContactPerson()
            Me._address = New DEXPREOutwardProcessingOwnerAddress()
            Me._identification = New DEXPREOutwardProcessingOwnerIdentification()
        End Sub

        Public Property [Class]() As DEXPREOutwardProcessingOwnerClass
            Get
                Return Me._class
            End Get
            Set(value As DEXPREOutwardProcessingOwnerClass)
                Me._class = Value
            End Set
        End Property

        Public Property Identification() As DEXPREOutwardProcessingOwnerIdentification
            Get
                Return Me._identification
            End Get
            Set(value As DEXPREOutwardProcessingOwnerIdentification)
                Me._identification = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set(value As String)
                Me._name = Value
            End Set
        End Property

        Public Property Address() As DEXPREOutwardProcessingOwnerAddress
            Get
                Return Me._address
            End Get
            Set(value As DEXPREOutwardProcessingOwnerAddress)
                Me._address = Value
            End Set
        End Property

        Public Property ContactPerson() As DEXPREOutwardProcessingOwnerContactPerson
            Get
                Return Me._contactPerson
            End Get
            Set(value As DEXPREOutwardProcessingOwnerContactPerson)
                Me._contactPerson = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREOutwardProcessingOwner))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREOutwardProcessingOwner object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREOutwardProcessingOwner object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREOutwardProcessingOwner object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREOutwardProcessingOwner, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREOutwardProcessingOwner)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREOutwardProcessingOwner) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREOutwardProcessingOwner
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREOutwardProcessingOwner)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREOutwardProcessingOwner
            Return CType(Serializer.Deserialize(s), DEXPREOutwardProcessingOwner)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREOutwardProcessingOwner object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREOutwardProcessingOwner object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREOutwardProcessingOwner object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREOutwardProcessingOwner, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREOutwardProcessingOwner)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREOutwardProcessingOwner) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREOutwardProcessingOwner
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREOutwardProcessingOwnerClass

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0")> _
        Item0

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("2")> _
        Item2
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREOutwardProcessingOwnerIdentification

#Region "Private fields"
        Private _referenceNumber As String

        Private _subsidiaryNumber As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set(value As String)
                Me._referenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property SubsidiaryNumber() As String
            Get
                Return Me._subsidiaryNumber
            End Get
            Set(value As String)
                Me._subsidiaryNumber = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREOutwardProcessingOwnerIdentification))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREOutwardProcessingOwnerIdentification object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREOutwardProcessingOwnerIdentification object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREOutwardProcessingOwnerIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREOutwardProcessingOwnerIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREOutwardProcessingOwnerIdentification)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREOutwardProcessingOwnerIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREOutwardProcessingOwnerIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREOutwardProcessingOwnerIdentification)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREOutwardProcessingOwnerIdentification
            Return CType(Serializer.Deserialize(s), DEXPREOutwardProcessingOwnerIdentification)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREOutwardProcessingOwnerIdentification object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREOutwardProcessingOwnerIdentification object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREOutwardProcessingOwnerIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREOutwardProcessingOwnerIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREOutwardProcessingOwnerIdentification)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREOutwardProcessingOwnerIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREOutwardProcessingOwnerIdentification
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREOutwardProcessingOwnerAddress

#Region "Private fields"
        Private _line As String

        Private _city As String

        Private _postcode As String

        Private _country As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Line() As String
            Get
                Return Me._line
            End Get
            Set(value As String)
                Me._line = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property City() As String
            Get
                Return Me._city
            End Get
            Set(value As String)
                Me._city = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Postcode() As String
            Get
                Return Me._postcode
            End Get
            Set(value As String)
                Me._postcode = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Country() As String
            Get
                Return Me._country
            End Get
            Set(value As String)
                Me._country = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREOutwardProcessingOwnerAddress))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREOutwardProcessingOwnerAddress object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREOutwardProcessingOwnerAddress object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREOutwardProcessingOwnerAddress object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREOutwardProcessingOwnerAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREOutwardProcessingOwnerAddress)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREOutwardProcessingOwnerAddress) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREOutwardProcessingOwnerAddress
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREOutwardProcessingOwnerAddress)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREOutwardProcessingOwnerAddress
            Return CType(Serializer.Deserialize(s), DEXPREOutwardProcessingOwnerAddress)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREOutwardProcessingOwnerAddress object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREOutwardProcessingOwnerAddress object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREOutwardProcessingOwnerAddress object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREOutwardProcessingOwnerAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREOutwardProcessingOwnerAddress)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREOutwardProcessingOwnerAddress) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREOutwardProcessingOwnerAddress
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREOutwardProcessingOwnerContactPerson

#Region "Private fields"
        Private _position As String

        Private _name As String

        Private _phoneNumber As String

        Private _facsimileNumber As String

        Private _mailAddress As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Position() As String
            Get
                Return Me._position
            End Get
            Set(value As String)
                Me._position = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set(value As String)
                Me._name = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property PhoneNumber() As String
            Get
                Return Me._phoneNumber
            End Get
            Set(value As String)
                Me._phoneNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property FacsimileNumber() As String
            Get
                Return Me._facsimileNumber
            End Get
            Set(value As String)
                Me._facsimileNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property MailAddress() As String
            Get
                Return Me._mailAddress
            End Get
            Set(value As String)
                Me._mailAddress = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREOutwardProcessingOwnerContactPerson))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREOutwardProcessingOwnerContactPerson object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREOutwardProcessingOwnerContactPerson object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREOutwardProcessingOwnerContactPerson object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREOutwardProcessingOwnerContactPerson, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREOutwardProcessingOwnerContactPerson)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREOutwardProcessingOwnerContactPerson) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREOutwardProcessingOwnerContactPerson
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREOutwardProcessingOwnerContactPerson)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREOutwardProcessingOwnerContactPerson
            Return CType(Serializer.Deserialize(s), DEXPREOutwardProcessingOwnerContactPerson)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREOutwardProcessingOwnerContactPerson object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREOutwardProcessingOwnerContactPerson object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREOutwardProcessingOwnerContactPerson object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREOutwardProcessingOwnerContactPerson, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREOutwardProcessingOwnerContactPerson)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREOutwardProcessingOwnerContactPerson) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREOutwardProcessingOwnerContactPerson
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREConsignee

#Region "Private fields"
        Private _class As DEXPREConsigneeClass

        Private _identification As DEXPREConsigneeIdentification

        Private _name As String

        Private _address As DEXPREConsigneeAddress

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._address = New DEXPREConsigneeAddress()
            Me._identification = New DEXPREConsigneeIdentification()
        End Sub

        Public Property [Class]() As DEXPREConsigneeClass
            Get
                Return Me._class
            End Get
            Set(value As DEXPREConsigneeClass)
                Me._class = Value
            End Set
        End Property

        Public Property Identification() As DEXPREConsigneeIdentification
            Get
                Return Me._identification
            End Get
            Set(value As DEXPREConsigneeIdentification)
                Me._identification = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set(value As String)
                Me._name = Value
            End Set
        End Property

        Public Property Address() As DEXPREConsigneeAddress
            Get
                Return Me._address
            End Get
            Set(value As DEXPREConsigneeAddress)
                Me._address = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREConsignee))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREConsignee object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREConsignee object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREConsignee object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREConsignee, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREConsignee)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREConsignee) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREConsignee
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREConsignee)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREConsignee
            Return CType(Serializer.Deserialize(s), DEXPREConsignee)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREConsignee object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREConsignee object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREConsignee object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREConsignee, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREConsignee)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREConsignee) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREConsignee
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREConsigneeClass

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0")> _
        Item0

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("2")> _
        Item2

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("3")> _
        Item3

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("4")> _
        Item4
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREConsigneeIdentification

#Region "Private fields"
        Private _referenceNumber As String

        Private _subsidiaryNumber As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set(value As String)
                Me._referenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property SubsidiaryNumber() As String
            Get
                Return Me._subsidiaryNumber
            End Get
            Set(value As String)
                Me._subsidiaryNumber = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREConsigneeIdentification))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREConsigneeIdentification object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREConsigneeIdentification object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREConsigneeIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREConsigneeIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREConsigneeIdentification)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREConsigneeIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREConsigneeIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREConsigneeIdentification)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREConsigneeIdentification
            Return CType(Serializer.Deserialize(s), DEXPREConsigneeIdentification)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREConsigneeIdentification object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREConsigneeIdentification object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREConsigneeIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREConsigneeIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREConsigneeIdentification)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREConsigneeIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREConsigneeIdentification
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREConsigneeAddress

#Region "Private fields"
        Private _line As String

        Private _city As String

        Private _postcode As String

        Private _country As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Line() As String
            Get
                Return Me._line
            End Get
            Set(value As String)
                Me._line = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property City() As String
            Get
                Return Me._city
            End Get
            Set(value As String)
                Me._city = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Postcode() As String
            Get
                Return Me._postcode
            End Get
            Set(value As String)
                Me._postcode = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Country() As String
            Get
                Return Me._country
            End Get
            Set(value As String)
                Me._country = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREConsigneeAddress))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREConsigneeAddress object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREConsigneeAddress object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREConsigneeAddress object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREConsigneeAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREConsigneeAddress)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREConsigneeAddress) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREConsigneeAddress
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREConsigneeAddress)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREConsigneeAddress
            Return CType(Serializer.Deserialize(s), DEXPREConsigneeAddress)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREConsigneeAddress object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREConsigneeAddress object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREConsigneeAddress object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREConsigneeAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREConsigneeAddress)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREConsigneeAddress) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREConsigneeAddress
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREDeliveryTerms

#Region "Private fields"
        Private _incotermCode As DEXPREDeliveryTermsIncotermCode

        Private _description As String

        Private _location As String

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Property IncotermCode() As DEXPREDeliveryTermsIncotermCode
            Get
                Return Me._incotermCode
            End Get
            Set(value As DEXPREDeliveryTermsIncotermCode)
                Me._incotermCode = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Description() As String
            Get
                Return Me._description
            End Get
            Set(value As String)
                Me._description = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Location() As String
            Get
                Return Me._location
            End Get
            Set(value As String)
                Me._location = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREDeliveryTerms))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREDeliveryTerms object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREDeliveryTerms object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREDeliveryTerms object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREDeliveryTerms, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREDeliveryTerms)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREDeliveryTerms) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREDeliveryTerms
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREDeliveryTerms)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREDeliveryTerms
            Return CType(Serializer.Deserialize(s), DEXPREDeliveryTerms)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREDeliveryTerms object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREDeliveryTerms object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREDeliveryTerms object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREDeliveryTerms, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREDeliveryTerms)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREDeliveryTerms) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREDeliveryTerms
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREDeliveryTermsIncotermCode

        '''<remarks/>
        CFR

        '''<remarks/>
        CIF

        '''<remarks/>
        CIP

        '''<remarks/>
        CPT

        '''<remarks/>
        DAF

        '''<remarks/>
        DAP

        '''<remarks/>
        DAT

        '''<remarks/>
        DDP

        '''<remarks/>
        DDU

        '''<remarks/>
        DEQ

        '''<remarks/>
        DES

        '''<remarks/>
        EXW

        '''<remarks/>
        FAS

        '''<remarks/>
        FCA

        '''<remarks/>
        FOB

        '''<remarks/>
        XXX
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREOutwardProcessing

#Region "Private fields"
        Private _reimportDate As Date

        Private _usualReplacement As DEXPREOutwardProcessingUsualReplacement

        Private _reimport As List(Of DEXPREOutwardProcessingReimport)

        Private _identificationMeans As List(Of DEXPREOutwardProcessingIdentificationMeans)

        Private _product As List(Of DEXPREOutwardProcessingProduct)

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._product = New List(Of DEXPREOutwardProcessingProduct)()
            Me._identificationMeans = New List(Of DEXPREOutwardProcessingIdentificationMeans)()
            Me._reimport = New List(Of DEXPREOutwardProcessingReimport)()
        End Sub

        <System.Xml.Serialization.XmlElementAttribute(DataType:="date")> _
        Public Property ReimportDate() As Date
            Get
                Return Me._reimportDate
            End Get
            Set(value As Date)
                Me._reimportDate = Value
            End Set
        End Property

        Public Property UsualReplacement() As DEXPREOutwardProcessingUsualReplacement
            Get
                Return Me._usualReplacement
            End Get
            Set(value As DEXPREOutwardProcessingUsualReplacement)
                Me._usualReplacement = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute("Reimport")> _
        Public Property Reimport() As List(Of DEXPREOutwardProcessingReimport)
            Get
                Return Me._reimport
            End Get
            Set(value As List(Of DEXPREOutwardProcessingReimport))
                Me._reimport = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute("IdentificationMeans")> _
        Public Property IdentificationMeans() As List(Of DEXPREOutwardProcessingIdentificationMeans)
            Get
                Return Me._identificationMeans
            End Get
            Set(value As List(Of DEXPREOutwardProcessingIdentificationMeans))
                Me._identificationMeans = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute("Product")> _
        Public Property Product() As List(Of DEXPREOutwardProcessingProduct)
            Get
                Return Me._product
            End Get
            Set(value As List(Of DEXPREOutwardProcessingProduct))
                Me._product = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREOutwardProcessing))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREOutwardProcessing object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREOutwardProcessing object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREOutwardProcessing object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREOutwardProcessing, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREOutwardProcessing)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREOutwardProcessing) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREOutwardProcessing
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREOutwardProcessing)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREOutwardProcessing
            Return CType(Serializer.Deserialize(s), DEXPREOutwardProcessing)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREOutwardProcessing object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREOutwardProcessing object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREOutwardProcessing object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREOutwardProcessing, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREOutwardProcessing)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREOutwardProcessing) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREOutwardProcessing
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREOutwardProcessingUsualReplacement

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0")> _
        Item0

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1")> _
        Item1
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREOutwardProcessingReimport

#Region "Private fields"
        Private _country As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Country() As String
            Get
                Return Me._country
            End Get
            Set(value As String)
                Me._country = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREOutwardProcessingReimport))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREOutwardProcessingReimport object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREOutwardProcessingReimport object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREOutwardProcessingReimport object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREOutwardProcessingReimport, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREOutwardProcessingReimport)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREOutwardProcessingReimport) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREOutwardProcessingReimport
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREOutwardProcessingReimport)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREOutwardProcessingReimport
            Return CType(Serializer.Deserialize(s), DEXPREOutwardProcessingReimport)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREOutwardProcessingReimport object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREOutwardProcessingReimport object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREOutwardProcessingReimport object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREOutwardProcessingReimport, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREOutwardProcessingReimport)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREOutwardProcessingReimport) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREOutwardProcessingReimport
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREOutwardProcessingIdentificationMeans

#Region "Private fields"
        Private _type As DEXPREOutwardProcessingIdentificationMeansType

        Private _description As String

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Property Type() As DEXPREOutwardProcessingIdentificationMeansType
            Get
                Return Me._type
            End Get
            Set(value As DEXPREOutwardProcessingIdentificationMeansType)
                Me._type = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Description() As String
            Get
                Return Me._description
            End Get
            Set(value As String)
                Me._description = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREOutwardProcessingIdentificationMeans))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREOutwardProcessingIdentificationMeans object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREOutwardProcessingIdentificationMeans object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREOutwardProcessingIdentificationMeans object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREOutwardProcessingIdentificationMeans, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREOutwardProcessingIdentificationMeans)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREOutwardProcessingIdentificationMeans) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREOutwardProcessingIdentificationMeans
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREOutwardProcessingIdentificationMeans)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREOutwardProcessingIdentificationMeans
            Return CType(Serializer.Deserialize(s), DEXPREOutwardProcessingIdentificationMeans)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREOutwardProcessingIdentificationMeans object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREOutwardProcessingIdentificationMeans object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREOutwardProcessingIdentificationMeans object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREOutwardProcessingIdentificationMeans, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREOutwardProcessingIdentificationMeans)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREOutwardProcessingIdentificationMeans) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREOutwardProcessingIdentificationMeans
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREOutwardProcessingIdentificationMeansType

        '''<remarks/>
        A

        '''<remarks/>
        B

        '''<remarks/>
        N

        '''<remarks/>
        O

        '''<remarks/>
        P

        '''<remarks/>
        S

        '''<remarks/>
        T

        '''<remarks/>
        Z
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREOutwardProcessingProduct

#Region "Private fields"
        Private _commodityCode As String

        Private _goodsDescription As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property CommodityCode() As String
            Get
                Return Me._commodityCode
            End Get
            Set(value As String)
                Me._commodityCode = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property GoodsDescription() As String
            Get
                Return Me._goodsDescription
            End Get
            Set(value As String)
                Me._goodsDescription = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREOutwardProcessingProduct))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREOutwardProcessingProduct object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREOutwardProcessingProduct object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREOutwardProcessingProduct object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREOutwardProcessingProduct, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREOutwardProcessingProduct)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREOutwardProcessingProduct) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREOutwardProcessingProduct
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREOutwardProcessingProduct)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREOutwardProcessingProduct
            Return CType(Serializer.Deserialize(s), DEXPREOutwardProcessingProduct)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREOutwardProcessingProduct object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREOutwardProcessingProduct object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREOutwardProcessingProduct object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREOutwardProcessingProduct, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREOutwardProcessingProduct)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREOutwardProcessingProduct) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREOutwardProcessingProduct
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItem

#Region "Private fields"
        Private _sequenceNumber As String

        Private _goodsDescription As String

        Private _commercialReferenceNumber As String

        Private _registrationNumber As String

        Private _originFederalState As DEXPREGoodsItemOriginFederalState

        Private _netMass As Decimal

        Private _grossMass As Decimal

        Private _originalSequenceNumber As String

        Private _dangerousGoodsCode As String

        Private _transportChargesPaymentMethod As String

        Private _commodityCode As DEXPREGoodsItemCommodityCode

        Private _exportRefund As DEXPREGoodsItemExportRefund

        Private _procedure As DEXPREGoodsItemProcedure

        Private _foreignTradeStatistics As DEXPREGoodsItemForeignTradeStatistics

        Private _consignee As DEXPREGoodsItemConsignee

        Private _package As List(Of DEXPREGoodsItemPackage)

        Private _container As List(Of DEXPREGoodsItemContainer)

        Private _document As List(Of DEXPREGoodsItemDocument)

        Private _previousAdminstrativeReference As List(Of DEXPREGoodsItemPreviousAdminstrativeReference)

        Private _deliveryTerms As DEXPREGoodsItemDeliveryTerms

        Private _transaction As DEXPREGoodsItemTransaction

        Private _customsWarehouse As DEXPREGoodsItemCustomsWarehouse

        Private _inwardProcessingTransformation As DEXPREGoodsItemInwardProcessingTransformation

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._inwardProcessingTransformation = New DEXPREGoodsItemInwardProcessingTransformation()
            Me._customsWarehouse = New DEXPREGoodsItemCustomsWarehouse()
            Me._transaction = New DEXPREGoodsItemTransaction()
            Me._deliveryTerms = New DEXPREGoodsItemDeliveryTerms()
            Me._previousAdminstrativeReference = New List(Of DEXPREGoodsItemPreviousAdminstrativeReference)()
            Me._document = New List(Of DEXPREGoodsItemDocument)()
            Me._container = New List(Of DEXPREGoodsItemContainer)()
            Me._package = New List(Of DEXPREGoodsItemPackage)()
            Me._consignee = New DEXPREGoodsItemConsignee()
            Me._foreignTradeStatistics = New DEXPREGoodsItemForeignTradeStatistics()
            Me._procedure = New DEXPREGoodsItemProcedure()
            Me._exportRefund = New DEXPREGoodsItemExportRefund()
            Me._commodityCode = New DEXPREGoodsItemCommodityCode()
        End Sub

        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer")> _
        Public Property SequenceNumber() As String
            Get
                Return Me._sequenceNumber
            End Get
            Set(value As String)
                Me._sequenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property GoodsDescription() As String
            Get
                Return Me._goodsDescription
            End Get
            Set(value As String)
                Me._goodsDescription = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property CommercialReferenceNumber() As String
            Get
                Return Me._commercialReferenceNumber
            End Get
            Set(value As String)
                Me._commercialReferenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property RegistrationNumber() As String
            Get
                Return Me._registrationNumber
            End Get
            Set(value As String)
                Me._registrationNumber = Value
            End Set
        End Property

        Public Property OriginFederalState() As DEXPREGoodsItemOriginFederalState
            Get
                Return Me._originFederalState
            End Get
            Set(value As DEXPREGoodsItemOriginFederalState)
                Me._originFederalState = Value
            End Set
        End Property

        Public Property NetMass() As Decimal
            Get
                Return Me._netMass
            End Get
            Set(value As Decimal)
                Me._netMass = Value
            End Set
        End Property

        Public Property GrossMass() As Decimal
            Get
                Return Me._grossMass
            End Get
            Set(value As Decimal)
                Me._grossMass = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer")> _
        Public Property OriginalSequenceNumber() As String
            Get
                Return Me._originalSequenceNumber
            End Get
            Set(value As String)
                Me._originalSequenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property DangerousGoodsCode() As String
            Get
                Return Me._dangerousGoodsCode
            End Get
            Set(value As String)
                Me._dangerousGoodsCode = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property TransportChargesPaymentMethod() As String
            Get
                Return Me._transportChargesPaymentMethod
            End Get
            Set(value As String)
                Me._transportChargesPaymentMethod = Value
            End Set
        End Property

        Public Property CommodityCode() As DEXPREGoodsItemCommodityCode
            Get
                Return Me._commodityCode
            End Get
            Set(value As DEXPREGoodsItemCommodityCode)
                Me._commodityCode = Value
            End Set
        End Property

        Public Property ExportRefund() As DEXPREGoodsItemExportRefund
            Get
                Return Me._exportRefund
            End Get
            Set(value As DEXPREGoodsItemExportRefund)
                Me._exportRefund = Value
            End Set
        End Property

        Public Property Procedure() As DEXPREGoodsItemProcedure
            Get
                Return Me._procedure
            End Get
            Set(value As DEXPREGoodsItemProcedure)
                Me._procedure = Value
            End Set
        End Property

        Public Property ForeignTradeStatistics() As DEXPREGoodsItemForeignTradeStatistics
            Get
                Return Me._foreignTradeStatistics
            End Get
            Set(value As DEXPREGoodsItemForeignTradeStatistics)
                Me._foreignTradeStatistics = Value
            End Set
        End Property

        Public Property Consignee() As DEXPREGoodsItemConsignee
            Get
                Return Me._consignee
            End Get
            Set(value As DEXPREGoodsItemConsignee)
                Me._consignee = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute("Package")> _
        Public Property Package() As List(Of DEXPREGoodsItemPackage)
            Get
                Return Me._package
            End Get
            Set(value As List(Of DEXPREGoodsItemPackage))
                Me._package = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute("Container")> _
        Public Property Container() As List(Of DEXPREGoodsItemContainer)
            Get
                Return Me._container
            End Get
            Set(value As List(Of DEXPREGoodsItemContainer))
                Me._container = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute("Document")> _
        Public Property Document() As List(Of DEXPREGoodsItemDocument)
            Get
                Return Me._document
            End Get
            Set(value As List(Of DEXPREGoodsItemDocument))
                Me._document = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute("PreviousAdminstrativeReference")> _
        Public Property PreviousAdminstrativeReference() As List(Of DEXPREGoodsItemPreviousAdminstrativeReference)
            Get
                Return Me._previousAdminstrativeReference
            End Get
            Set(value As List(Of DEXPREGoodsItemPreviousAdminstrativeReference))
                Me._previousAdminstrativeReference = Value
            End Set
        End Property

        Public Property DeliveryTerms() As DEXPREGoodsItemDeliveryTerms
            Get
                Return Me._deliveryTerms
            End Get
            Set(value As DEXPREGoodsItemDeliveryTerms)
                Me._deliveryTerms = Value
            End Set
        End Property

        Public Property Transaction() As DEXPREGoodsItemTransaction
            Get
                Return Me._transaction
            End Get
            Set(value As DEXPREGoodsItemTransaction)
                Me._transaction = Value
            End Set
        End Property

        Public Property CustomsWarehouse() As DEXPREGoodsItemCustomsWarehouse
            Get
                Return Me._customsWarehouse
            End Get
            Set(value As DEXPREGoodsItemCustomsWarehouse)
                Me._customsWarehouse = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute("InwardProcessing-Transformation")> _
        Public Property InwardProcessingTransformation() As DEXPREGoodsItemInwardProcessingTransformation
            Get
                Return Me._inwardProcessingTransformation
            End Get
            Set(value As DEXPREGoodsItemInwardProcessingTransformation)
                Me._inwardProcessingTransformation = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItem))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItem object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItem object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItem object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItem, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItem)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItem) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItem
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItem)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItem
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItem)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItem object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItem object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItem object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItem, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItem)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItem) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItem
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREGoodsItemOriginFederalState

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("01")> _
        Item01

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("02")> _
        Item02

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("03")> _
        Item03

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("04")> _
        Item04

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("05")> _
        Item05

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("06")> _
        Item06

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("07")> _
        Item07

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("08")> _
        Item08

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("09")> _
        Item09

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("10")> _
        Item10

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("11")> _
        Item11

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("12")> _
        Item12

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("13")> _
        Item13

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("14")> _
        Item14

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("15")> _
        Item15

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("16")> _
        Item16

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("99")> _
        Item99
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemCommodityCode

#Region "Private fields"
        Private _combinedNomenclatureCode As String

        Private _taricCode As String

        Private _taricFirstAdditionalCode As String

        Private _taricSecondAdditionalCode As String

        Private _nationalAdditionalCode As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property CombinedNomenclatureCode() As String
            Get
                Return Me._combinedNomenclatureCode
            End Get
            Set(value As String)
                Me._combinedNomenclatureCode = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property TaricCode() As String
            Get
                Return Me._taricCode
            End Get
            Set(value As String)
                Me._taricCode = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property TaricFirstAdditionalCode() As String
            Get
                Return Me._taricFirstAdditionalCode
            End Get
            Set(value As String)
                Me._taricFirstAdditionalCode = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property TaricSecondAdditionalCode() As String
            Get
                Return Me._taricSecondAdditionalCode
            End Get
            Set(value As String)
                Me._taricSecondAdditionalCode = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer")> _
        Public Property NationalAdditionalCode() As String
            Get
                Return Me._nationalAdditionalCode
            End Get
            Set(value As String)
                Me._nationalAdditionalCode = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemCommodityCode))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemCommodityCode object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemCommodityCode object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemCommodityCode object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemCommodityCode, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemCommodityCode)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemCommodityCode) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemCommodityCode
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemCommodityCode)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemCommodityCode
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemCommodityCode)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemCommodityCode object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemCommodityCode object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemCommodityCode object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemCommodityCode, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemCommodityCode)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemCommodityCode) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemCommodityCode
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemExportRefund

#Region "Private fields"
        Private _goodsDescriptionFirstAddendum As String

        Private _goodsDescriptionSecondAddendum As String

        Private _originCountry As String

        Private _measurementUnit As DEXPREGoodsItemExportRefundMeasurementUnit

        Private _quantity As Decimal

        Private _paymentCaseNonAnnex1 As DEXPREGoodsItemExportRefundPaymentCaseNonAnnex1

        Private _adaptationCoefficient As Decimal

        Private _valueA As Decimal

        Private _valueB As Decimal

        Private _valueC As Decimal

        Private _valueD As Decimal

        Private _ingredient As List(Of DEXPREGoodsItemExportRefundIngredient)

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._ingredient = New List(Of DEXPREGoodsItemExportRefundIngredient)()
        End Sub

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property GoodsDescriptionFirstAddendum() As String
            Get
                Return Me._goodsDescriptionFirstAddendum
            End Get
            Set(value As String)
                Me._goodsDescriptionFirstAddendum = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property GoodsDescriptionSecondAddendum() As String
            Get
                Return Me._goodsDescriptionSecondAddendum
            End Get
            Set(value As String)
                Me._goodsDescriptionSecondAddendum = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property OriginCountry() As String
            Get
                Return Me._originCountry
            End Get
            Set(value As String)
                Me._originCountry = Value
            End Set
        End Property

        Public Property MeasurementUnit() As DEXPREGoodsItemExportRefundMeasurementUnit
            Get
                Return Me._measurementUnit
            End Get
            Set(value As DEXPREGoodsItemExportRefundMeasurementUnit)
                Me._measurementUnit = Value
            End Set
        End Property

        Public Property Quantity() As Decimal
            Get
                Return Me._quantity
            End Get
            Set(value As Decimal)
                Me._quantity = Value
            End Set
        End Property

        Public Property PaymentCaseNonAnnex1() As DEXPREGoodsItemExportRefundPaymentCaseNonAnnex1
            Get
                Return Me._paymentCaseNonAnnex1
            End Get
            Set(value As DEXPREGoodsItemExportRefundPaymentCaseNonAnnex1)
                Me._paymentCaseNonAnnex1 = Value
            End Set
        End Property

        Public Property AdaptationCoefficient() As Decimal
            Get
                Return Me._adaptationCoefficient
            End Get
            Set(value As Decimal)
                Me._adaptationCoefficient = Value
            End Set
        End Property

        Public Property ValueA() As Decimal
            Get
                Return Me._valueA
            End Get
            Set(value As Decimal)
                Me._valueA = Value
            End Set
        End Property

        Public Property ValueB() As Decimal
            Get
                Return Me._valueB
            End Get
            Set(value As Decimal)
                Me._valueB = Value
            End Set
        End Property

        Public Property ValueC() As Decimal
            Get
                Return Me._valueC
            End Get
            Set(value As Decimal)
                Me._valueC = Value
            End Set
        End Property

        Public Property ValueD() As Decimal
            Get
                Return Me._valueD
            End Get
            Set(value As Decimal)
                Me._valueD = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute("Ingredient")> _
        Public Property Ingredient() As List(Of DEXPREGoodsItemExportRefundIngredient)
            Get
                Return Me._ingredient
            End Get
            Set(value As List(Of DEXPREGoodsItemExportRefundIngredient))
                Me._ingredient = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemExportRefund))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemExportRefund object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemExportRefund object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemExportRefund object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemExportRefund, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemExportRefund)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemExportRefund) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemExportRefund
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemExportRefund)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemExportRefund
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemExportRefund)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemExportRefund object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemExportRefund object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemExportRefund object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemExportRefund, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemExportRefund)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemExportRefund) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemExportRefund
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREGoodsItemExportRefundMeasurementUnit

        '''<remarks/>
        CEN

        '''<remarks/>
        DTN

        '''<remarks/>
        HLT

        '''<remarks/>
        KGM

        '''<remarks/>
        LTR

        '''<remarks/>
        MIL

        '''<remarks/>
        NAR

        '''<remarks/>
        TNE
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREGoodsItemExportRefundPaymentCaseNonAnnex1

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("2")> _
        Item2

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("3")> _
        Item3

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("4")> _
        Item4
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemExportRefundIngredient

#Region "Private fields"
        Private _sequenceNumber As String

        Private _conversionFactor1 As Decimal

        Private _conversionFactorMode As DEXPREGoodsItemExportRefundIngredientConversionFactorMode

        Private _conversionFactor2 As Decimal

        Private _conversionFactorRate As Decimal

        Private _massPercentage As Decimal

        Private _fractionMass As Decimal

        Private _manufacturersDeclarationNumber As String

        Private _commodityCode As String

        Private _licenseNumber As String

        Private _statements As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer")> _
        Public Property SequenceNumber() As String
            Get
                Return Me._sequenceNumber
            End Get
            Set(value As String)
                Me._sequenceNumber = Value
            End Set
        End Property

        Public Property ConversionFactor1() As Decimal
            Get
                Return Me._conversionFactor1
            End Get
            Set(value As Decimal)
                Me._conversionFactor1 = Value
            End Set
        End Property

        Public Property ConversionFactorMode() As DEXPREGoodsItemExportRefundIngredientConversionFactorMode
            Get
                Return Me._conversionFactorMode
            End Get
            Set(value As DEXPREGoodsItemExportRefundIngredientConversionFactorMode)
                Me._conversionFactorMode = Value
            End Set
        End Property

        Public Property ConversionFactor2() As Decimal
            Get
                Return Me._conversionFactor2
            End Get
            Set(value As Decimal)
                Me._conversionFactor2 = Value
            End Set
        End Property

        Public Property ConversionFactorRate() As Decimal
            Get
                Return Me._conversionFactorRate
            End Get
            Set(value As Decimal)
                Me._conversionFactorRate = Value
            End Set
        End Property

        Public Property MassPercentage() As Decimal
            Get
                Return Me._massPercentage
            End Get
            Set(value As Decimal)
                Me._massPercentage = Value
            End Set
        End Property

        Public Property FractionMass() As Decimal
            Get
                Return Me._fractionMass
            End Get
            Set(value As Decimal)
                Me._fractionMass = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ManufacturersDeclarationNumber() As String
            Get
                Return Me._manufacturersDeclarationNumber
            End Get
            Set(value As String)
                Me._manufacturersDeclarationNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property CommodityCode() As String
            Get
                Return Me._commodityCode
            End Get
            Set(value As String)
                Me._commodityCode = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property LicenseNumber() As String
            Get
                Return Me._licenseNumber
            End Get
            Set(value As String)
                Me._licenseNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Statements() As String
            Get
                Return Me._statements
            End Get
            Set(value As String)
                Me._statements = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemExportRefundIngredient))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemExportRefundIngredient object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemExportRefundIngredient object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemExportRefundIngredient object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemExportRefundIngredient, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemExportRefundIngredient)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemExportRefundIngredient) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemExportRefundIngredient
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemExportRefundIngredient)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemExportRefundIngredient
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemExportRefundIngredient)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemExportRefundIngredient object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemExportRefundIngredient object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemExportRefundIngredient object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemExportRefundIngredient, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemExportRefundIngredient)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemExportRefundIngredient) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemExportRefundIngredient
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREGoodsItemExportRefundIngredientConversionFactorMode

        '''<remarks/>
        D

        '''<remarks/>
        F
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemProcedure

#Region "Private fields"
        Private _requestedProcedure As String

        Private _previousProcedure As String

        Private _additionalProcedure As String

        Private _exportRefundProcedure As DEXPREGoodsItemProcedureExportRefundProcedure

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property RequestedProcedure() As String
            Get
                Return Me._requestedProcedure
            End Get
            Set(value As String)
                Me._requestedProcedure = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property PreviousProcedure() As String
            Get
                Return Me._previousProcedure
            End Get
            Set(value As String)
                Me._previousProcedure = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property AdditionalProcedure() As String
            Get
                Return Me._additionalProcedure
            End Get
            Set(value As String)
                Me._additionalProcedure = Value
            End Set
        End Property

        Public Property ExportRefundProcedure() As DEXPREGoodsItemProcedureExportRefundProcedure
            Get
                Return Me._exportRefundProcedure
            End Get
            Set(value As DEXPREGoodsItemProcedureExportRefundProcedure)
                Me._exportRefundProcedure = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemProcedure))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemProcedure object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemProcedure object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemProcedure object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemProcedure, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemProcedure)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemProcedure) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemProcedure
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemProcedure)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemProcedure
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemProcedure)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemProcedure object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemProcedure object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemProcedure object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemProcedure, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemProcedure)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemProcedure) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemProcedure
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREGoodsItemProcedureExportRefundProcedure

        '''<remarks/>
        E51

        '''<remarks/>
        E52

        '''<remarks/>
        E53

        '''<remarks/>
        E61

        '''<remarks/>
        E62

        '''<remarks/>
        E63

        '''<remarks/>
        E71
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemForeignTradeStatistics

#Region "Private fields"
        Private _specialUnitQuantity As Decimal

        Private _statisticalValue As String

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Property SpecialUnitQuantity() As Decimal
            Get
                Return Me._specialUnitQuantity
            End Get
            Set(value As Decimal)
                Me._specialUnitQuantity = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer")> _
        Public Property StatisticalValue() As String
            Get
                Return Me._statisticalValue
            End Get
            Set(value As String)
                Me._statisticalValue = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemForeignTradeStatistics))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemForeignTradeStatistics object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemForeignTradeStatistics object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemForeignTradeStatistics object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemForeignTradeStatistics, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemForeignTradeStatistics)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemForeignTradeStatistics) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemForeignTradeStatistics
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemForeignTradeStatistics)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemForeignTradeStatistics
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemForeignTradeStatistics)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemForeignTradeStatistics object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemForeignTradeStatistics object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemForeignTradeStatistics object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemForeignTradeStatistics, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemForeignTradeStatistics)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemForeignTradeStatistics) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemForeignTradeStatistics
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemConsignee

#Region "Private fields"
        Private _class As DEXPREGoodsItemConsigneeClass

        Private _identification As DEXPREGoodsItemConsigneeIdentification

        Private _name As String

        Private _address As DEXPREGoodsItemConsigneeAddress

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._address = New DEXPREGoodsItemConsigneeAddress()
            Me._identification = New DEXPREGoodsItemConsigneeIdentification()
        End Sub

        Public Property [Class]() As DEXPREGoodsItemConsigneeClass
            Get
                Return Me._class
            End Get
            Set(value As DEXPREGoodsItemConsigneeClass)
                Me._class = Value
            End Set
        End Property

        Public Property Identification() As DEXPREGoodsItemConsigneeIdentification
            Get
                Return Me._identification
            End Get
            Set(value As DEXPREGoodsItemConsigneeIdentification)
                Me._identification = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set(value As String)
                Me._name = Value
            End Set
        End Property

        Public Property Address() As DEXPREGoodsItemConsigneeAddress
            Get
                Return Me._address
            End Get
            Set(value As DEXPREGoodsItemConsigneeAddress)
                Me._address = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemConsignee))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemConsignee object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemConsignee object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemConsignee object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemConsignee, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemConsignee)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemConsignee) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemConsignee
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemConsignee)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemConsignee
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemConsignee)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemConsignee object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemConsignee object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemConsignee object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemConsignee, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemConsignee)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemConsignee) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemConsignee
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREGoodsItemConsigneeClass

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0")> _
        Item0

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("2")> _
        Item2

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("3")> _
        Item3

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("4")> _
        Item4
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemConsigneeIdentification

#Region "Private fields"
        Private _referenceNumber As String

        Private _subsidiaryNumber As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set(value As String)
                Me._referenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property SubsidiaryNumber() As String
            Get
                Return Me._subsidiaryNumber
            End Get
            Set(value As String)
                Me._subsidiaryNumber = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemConsigneeIdentification))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemConsigneeIdentification object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemConsigneeIdentification object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemConsigneeIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemConsigneeIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemConsigneeIdentification)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemConsigneeIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemConsigneeIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemConsigneeIdentification)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemConsigneeIdentification
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemConsigneeIdentification)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemConsigneeIdentification object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemConsigneeIdentification object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemConsigneeIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemConsigneeIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemConsigneeIdentification)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemConsigneeIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemConsigneeIdentification
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemConsigneeAddress

#Region "Private fields"
        Private _line As String

        Private _city As String

        Private _postcode As String

        Private _country As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Line() As String
            Get
                Return Me._line
            End Get
            Set(value As String)
                Me._line = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property City() As String
            Get
                Return Me._city
            End Get
            Set(value As String)
                Me._city = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Postcode() As String
            Get
                Return Me._postcode
            End Get
            Set(value As String)
                Me._postcode = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Country() As String
            Get
                Return Me._country
            End Get
            Set(value As String)
                Me._country = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemConsigneeAddress))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemConsigneeAddress object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemConsigneeAddress object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemConsigneeAddress object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemConsigneeAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemConsigneeAddress)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemConsigneeAddress) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemConsigneeAddress
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemConsigneeAddress)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemConsigneeAddress
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemConsigneeAddress)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemConsigneeAddress object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemConsigneeAddress object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemConsigneeAddress object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemConsigneeAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemConsigneeAddress)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemConsigneeAddress) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemConsigneeAddress
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemPackage

#Region "Private fields"
        Private _quantity As String

        Private _sequenceNumber As String

        Private _kind As String

        Private _marksNumbers As String

        Private _reference As DEXPREGoodsItemPackageReference

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._reference = New DEXPREGoodsItemPackageReference()
        End Sub

        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer")> _
        Public Property Quantity() As String
            Get
                Return Me._quantity
            End Get
            Set(value As String)
                Me._quantity = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer")> _
        Public Property SequenceNumber() As String
            Get
                Return Me._sequenceNumber
            End Get
            Set(value As String)
                Me._sequenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Kind() As String
            Get
                Return Me._kind
            End Get
            Set(value As String)
                Me._kind = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property MarksNumbers() As String
            Get
                Return Me._marksNumbers
            End Get
            Set(value As String)
                Me._marksNumbers = Value
            End Set
        End Property

        Public Property Reference() As DEXPREGoodsItemPackageReference
            Get
                Return Me._reference
            End Get
            Set(value As DEXPREGoodsItemPackageReference)
                Me._reference = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemPackage))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemPackage object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemPackage object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemPackage object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemPackage, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemPackage)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemPackage) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemPackage
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemPackage)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemPackage
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemPackage)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemPackage object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemPackage object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemPackage object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemPackage, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemPackage)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemPackage) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemPackage
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemPackageReference

#Region "Private fields"
        Private _positionNumber As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer")> _
        Public Property PositionNumber() As String
            Get
                Return Me._positionNumber
            End Get
            Set(value As String)
                Me._positionNumber = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemPackageReference))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemPackageReference object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemPackageReference object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemPackageReference object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemPackageReference, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemPackageReference)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemPackageReference) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemPackageReference
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemPackageReference)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemPackageReference
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemPackageReference)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemPackageReference object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemPackageReference object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemPackageReference object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemPackageReference, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemPackageReference)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemPackageReference) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemPackageReference
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemContainer

#Region "Private fields"
        Private _identificationNumber As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property IdentificationNumber() As String
            Get
                Return Me._identificationNumber
            End Get
            Set(value As String)
                Me._identificationNumber = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemContainer))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemContainer object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemContainer object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemContainer object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemContainer, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemContainer)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemContainer) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemContainer
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemContainer)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemContainer
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemContainer)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemContainer object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemContainer object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemContainer object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemContainer, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemContainer)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemContainer) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemContainer
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemDocument

#Region "Private fields"
        Private _qualifier As String

        Private _type As String

        Private _referenceNumber As String

        Private _complement As String

        Private _detail As String

        Private _issuingDate As Date

        Private _expiryDate As Date

        Private _writeOffValue As String

        Private _measurementUnit As DEXPREGoodsItemDocumentMeasurementUnit

        Private _writeOffQuantity As Decimal

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Qualifier() As String
            Get
                Return Me._qualifier
            End Get
            Set(value As String)
                Me._qualifier = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Type() As String
            Get
                Return Me._type
            End Get
            Set(value As String)
                Me._type = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set(value As String)
                Me._referenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Complement() As String
            Get
                Return Me._complement
            End Get
            Set(value As String)
                Me._complement = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Detail() As String
            Get
                Return Me._detail
            End Get
            Set(value As String)
                Me._detail = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="date")> _
        Public Property IssuingDate() As Date
            Get
                Return Me._issuingDate
            End Get
            Set(value As Date)
                Me._issuingDate = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="date")> _
        Public Property ExpiryDate() As Date
            Get
                Return Me._expiryDate
            End Get
            Set(value As Date)
                Me._expiryDate = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer")> _
        Public Property WriteOffValue() As String
            Get
                Return Me._writeOffValue
            End Get
            Set(value As String)
                Me._writeOffValue = Value
            End Set
        End Property

        Public Property MeasurementUnit() As DEXPREGoodsItemDocumentMeasurementUnit
            Get
                Return Me._measurementUnit
            End Get
            Set(value As DEXPREGoodsItemDocumentMeasurementUnit)
                Me._measurementUnit = Value
            End Set
        End Property

        Public Property WriteOffQuantity() As Decimal
            Get
                Return Me._writeOffQuantity
            End Get
            Set(value As Decimal)
                Me._writeOffQuantity = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemDocument))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemDocument object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemDocument object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemDocument object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemDocument, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemDocument)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemDocument) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemDocument
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemDocument)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemDocument
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemDocument)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemDocument object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemDocument object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemDocument object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemDocument, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemDocument)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemDocument) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemDocument
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREGoodsItemDocumentMeasurementUnit

        '''<remarks/>
        Los

        '''<remarks/>
        Mio

        '''<remarks/>
        Paar

        '''<remarks/>
        Satz

        '''<remarks/>
        St

        '''<remarks/>
        Syst

        '''<remarks/>
        cbm

        '''<remarks/>
        cm

        '''<remarks/>
        div

        '''<remarks/>
        g

        '''<remarks/>
        gPu

        '''<remarks/>
        gTh

        '''<remarks/>
        gU

        '''<remarks/>
        kg

        '''<remarks/>
        kgPu

        '''<remarks/>
        kgTh

        '''<remarks/>
        kgU

        '''<remarks/>
        km

        '''<remarks/>
        l

        '''<remarks/>
        lfm

        '''<remarks/>
        ltAnlage

        '''<remarks/>
        m

        '''<remarks/>
        mg

        '''<remarks/>
        ml

        '''<remarks/>
        mm

        '''<remarks/>
        qcm

        '''<remarks/>
        qm

        '''<remarks/>
        t

        '''<remarks/>
        tU

        '''<remarks/>
        µg

        '''<remarks/>
        µl

        '''<remarks/>
        µm
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemPreviousAdminstrativeReference

#Region "Private fields"
        Private _type As String

        Private _referenceNumber As String

        Private _complement As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Type() As String
            Get
                Return Me._type
            End Get
            Set(value As String)
                Me._type = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set(value As String)
                Me._referenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Complement() As String
            Get
                Return Me._complement
            End Get
            Set(value As String)
                Me._complement = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemPreviousAdminstrativeReference))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemPreviousAdminstrativeReference object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemPreviousAdminstrativeReference object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemPreviousAdminstrativeReference object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemPreviousAdminstrativeReference, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemPreviousAdminstrativeReference)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemPreviousAdminstrativeReference) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemPreviousAdminstrativeReference
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemPreviousAdminstrativeReference)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemPreviousAdminstrativeReference
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemPreviousAdminstrativeReference)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemPreviousAdminstrativeReference object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemPreviousAdminstrativeReference object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemPreviousAdminstrativeReference object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemPreviousAdminstrativeReference, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemPreviousAdminstrativeReference)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemPreviousAdminstrativeReference) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemPreviousAdminstrativeReference
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemDeliveryTerms

#Region "Private fields"
        Private _incotermCode As DEXPREGoodsItemDeliveryTermsIncotermCode

        Private _description As String

        Private _location As String

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Property IncotermCode() As DEXPREGoodsItemDeliveryTermsIncotermCode
            Get
                Return Me._incotermCode
            End Get
            Set(value As DEXPREGoodsItemDeliveryTermsIncotermCode)
                Me._incotermCode = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Description() As String
            Get
                Return Me._description
            End Get
            Set(value As String)
                Me._description = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Location() As String
            Get
                Return Me._location
            End Get
            Set(value As String)
                Me._location = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemDeliveryTerms))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemDeliveryTerms object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemDeliveryTerms object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemDeliveryTerms object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemDeliveryTerms, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemDeliveryTerms)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemDeliveryTerms) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemDeliveryTerms
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemDeliveryTerms)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemDeliveryTerms
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemDeliveryTerms)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemDeliveryTerms object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemDeliveryTerms object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemDeliveryTerms object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemDeliveryTerms, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemDeliveryTerms)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemDeliveryTerms) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemDeliveryTerms
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREGoodsItemDeliveryTermsIncotermCode

        '''<remarks/>
        CFR

        '''<remarks/>
        CIF

        '''<remarks/>
        CIP

        '''<remarks/>
        CPT

        '''<remarks/>
        DAF

        '''<remarks/>
        DAP

        '''<remarks/>
        DAT

        '''<remarks/>
        DDP

        '''<remarks/>
        DDU

        '''<remarks/>
        DEQ

        '''<remarks/>
        DES

        '''<remarks/>
        EXW

        '''<remarks/>
        FAS

        '''<remarks/>
        FCA

        '''<remarks/>
        FOB

        '''<remarks/>
        XXX
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemTransaction

#Region "Private fields"
        Private _type As DEXPREGoodsItemTransactionType

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Property Type() As DEXPREGoodsItemTransactionType
            Get
                Return Me._type
            End Get
            Set(value As DEXPREGoodsItemTransactionType)
                Me._type = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemTransaction))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemTransaction object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemTransaction object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemTransaction object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemTransaction, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemTransaction)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemTransaction) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemTransaction
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemTransaction)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemTransaction
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemTransaction)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemTransaction object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemTransaction object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemTransaction object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemTransaction, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemTransaction)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemTransaction) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemTransaction
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREGoodsItemTransactionType

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("11")> _
        Item11

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("12")> _
        Item12

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("13")> _
        Item13

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("14")> _
        Item14

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("19")> _
        Item19

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("21")> _
        Item21

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("22")> _
        Item22

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("23")> _
        Item23

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("29")> _
        Item29

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("31")> _
        Item31

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("32")> _
        Item32

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("33")> _
        Item33

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("34")> _
        Item34

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("41")> _
        Item41

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("42")> _
        Item42

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("51")> _
        Item51

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("52")> _
        Item52

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("67")> _
        Item67

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("69")> _
        Item69

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("71")> _
        Item71

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("72")> _
        Item72

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("81")> _
        Item81

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("91")> _
        Item91

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("92")> _
        Item92

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("99")> _
        Item99
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemCustomsWarehouse

#Region "Private fields"
        Private _alignmentFlag As DEXPREGoodsItemCustomsWarehouseAlignmentFlag

        Private _goodsItemQuantity As String

        Private _customsAuthorization As DEXPREGoodsItemCustomsWarehouseCustomsAuthorization

        Private _localReferenceNumber As String

        Private _goodsItem As List(Of DEXPREGoodsItemCustomsWarehouseGoodsItem)

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._goodsItem = New List(Of DEXPREGoodsItemCustomsWarehouseGoodsItem)()
            Me._customsAuthorization = New DEXPREGoodsItemCustomsWarehouseCustomsAuthorization()
        End Sub

        Public Property AlignmentFlag() As DEXPREGoodsItemCustomsWarehouseAlignmentFlag
            Get
                Return Me._alignmentFlag
            End Get
            Set(value As DEXPREGoodsItemCustomsWarehouseAlignmentFlag)
                Me._alignmentFlag = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer")> _
        Public Property GoodsItemQuantity() As String
            Get
                Return Me._goodsItemQuantity
            End Get
            Set(value As String)
                Me._goodsItemQuantity = Value
            End Set
        End Property

        Public Property CustomsAuthorization() As DEXPREGoodsItemCustomsWarehouseCustomsAuthorization
            Get
                Return Me._customsAuthorization
            End Get
            Set(value As DEXPREGoodsItemCustomsWarehouseCustomsAuthorization)
                Me._customsAuthorization = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property LocalReferenceNumber() As String
            Get
                Return Me._localReferenceNumber
            End Get
            Set(value As String)
                Me._localReferenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute("GoodsItem")> _
        Public Property GoodsItem() As List(Of DEXPREGoodsItemCustomsWarehouseGoodsItem)
            Get
                Return Me._goodsItem
            End Get
            Set(value As List(Of DEXPREGoodsItemCustomsWarehouseGoodsItem))
                Me._goodsItem = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemCustomsWarehouse))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemCustomsWarehouse object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemCustomsWarehouse object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemCustomsWarehouse object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemCustomsWarehouse, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemCustomsWarehouse)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemCustomsWarehouse) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemCustomsWarehouse
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemCustomsWarehouse)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemCustomsWarehouse
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemCustomsWarehouse)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemCustomsWarehouse object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemCustomsWarehouse object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemCustomsWarehouse object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemCustomsWarehouse, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemCustomsWarehouse)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemCustomsWarehouse) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemCustomsWarehouse
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREGoodsItemCustomsWarehouseAlignmentFlag

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0")> _
        Item0

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1")> _
        Item1
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemCustomsWarehouseCustomsAuthorization

#Region "Private fields"
        Private _warehouseOwner As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property WarehouseOwner() As String
            Get
                Return Me._warehouseOwner
            End Get
            Set(value As String)
                Me._warehouseOwner = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemCustomsWarehouseCustomsAuthorization))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemCustomsWarehouseCustomsAuthorization object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemCustomsWarehouseCustomsAuthorization object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemCustomsWarehouseCustomsAuthorization object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemCustomsWarehouseCustomsAuthorization, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemCustomsWarehouseCustomsAuthorization)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemCustomsWarehouseCustomsAuthorization) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemCustomsWarehouseCustomsAuthorization
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemCustomsWarehouseCustomsAuthorization)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemCustomsWarehouseCustomsAuthorization
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemCustomsWarehouseCustomsAuthorization)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemCustomsWarehouseCustomsAuthorization object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemCustomsWarehouseCustomsAuthorization object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemCustomsWarehouseCustomsAuthorization object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemCustomsWarehouseCustomsAuthorization, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemCustomsWarehouseCustomsAuthorization)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemCustomsWarehouseCustomsAuthorization) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemCustomsWarehouseCustomsAuthorization
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemCustomsWarehouseGoodsItem

#Region "Private fields"
        Private _sequenceNumber As String

        Private _referencedSequenceNumber As String

        Private _registrationNumber As String

        Private _commodityCode As String

        Private _accessViaAtlasFlag As DEXPREGoodsItemCustomsWarehouseGoodsItemAccessViaAtlasFlag

        Private _usualProcessingFlag As DEXPREGoodsItemCustomsWarehouseGoodsItemUsualProcessingFlag

        Private _complement As String

        Private _debitAmount As DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount

        Private _commercialAmount As DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._commercialAmount = New DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount()
            Me._debitAmount = New DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount()
        End Sub

        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer")> _
        Public Property SequenceNumber() As String
            Get
                Return Me._sequenceNumber
            End Get
            Set(value As String)
                Me._sequenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer")> _
        Public Property ReferencedSequenceNumber() As String
            Get
                Return Me._referencedSequenceNumber
            End Get
            Set(value As String)
                Me._referencedSequenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property RegistrationNumber() As String
            Get
                Return Me._registrationNumber
            End Get
            Set(value As String)
                Me._registrationNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property CommodityCode() As String
            Get
                Return Me._commodityCode
            End Get
            Set(value As String)
                Me._commodityCode = Value
            End Set
        End Property

        Public Property AccessViaAtlasFlag() As DEXPREGoodsItemCustomsWarehouseGoodsItemAccessViaAtlasFlag
            Get
                Return Me._accessViaAtlasFlag
            End Get
            Set(value As DEXPREGoodsItemCustomsWarehouseGoodsItemAccessViaAtlasFlag)
                Me._accessViaAtlasFlag = Value
            End Set
        End Property

        Public Property UsualProcessingFlag() As DEXPREGoodsItemCustomsWarehouseGoodsItemUsualProcessingFlag
            Get
                Return Me._usualProcessingFlag
            End Get
            Set(value As DEXPREGoodsItemCustomsWarehouseGoodsItemUsualProcessingFlag)
                Me._usualProcessingFlag = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Complement() As String
            Get
                Return Me._complement
            End Get
            Set(value As String)
                Me._complement = Value
            End Set
        End Property

        Public Property DebitAmount() As DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount
            Get
                Return Me._debitAmount
            End Get
            Set(value As DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount)
                Me._debitAmount = Value
            End Set
        End Property

        Public Property CommercialAmount() As DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount
            Get
                Return Me._commercialAmount
            End Get
            Set(value As DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount)
                Me._commercialAmount = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemCustomsWarehouseGoodsItem))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemCustomsWarehouseGoodsItem object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemCustomsWarehouseGoodsItem object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemCustomsWarehouseGoodsItem object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemCustomsWarehouseGoodsItem, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemCustomsWarehouseGoodsItem)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemCustomsWarehouseGoodsItem) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemCustomsWarehouseGoodsItem
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemCustomsWarehouseGoodsItem)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemCustomsWarehouseGoodsItem
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemCustomsWarehouseGoodsItem)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemCustomsWarehouseGoodsItem object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemCustomsWarehouseGoodsItem object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemCustomsWarehouseGoodsItem object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemCustomsWarehouseGoodsItem, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemCustomsWarehouseGoodsItem)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemCustomsWarehouseGoodsItem) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemCustomsWarehouseGoodsItem
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREGoodsItemCustomsWarehouseGoodsItemAccessViaAtlasFlag

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0")> _
        Item0

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1")> _
        Item1
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREGoodsItemCustomsWarehouseGoodsItemUsualProcessingFlag

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0")> _
        Item0

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1")> _
        Item1
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount

#Region "Private fields"
        Private _qualifier As String

        Private _measurementUnit As String

        Private _quantity As Decimal

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Qualifier() As String
            Get
                Return Me._qualifier
            End Get
            Set(value As String)
                Me._qualifier = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property MeasurementUnit() As String
            Get
                Return Me._measurementUnit
            End Get
            Set(value As String)
                Me._measurementUnit = Value
            End Set
        End Property

        Public Property Quantity() As Decimal
            Get
                Return Me._quantity
            End Get
            Set(value As Decimal)
                Me._quantity = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemCustomsWarehouseGoodsItemDebitAmount
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount

#Region "Private fields"
        Private _qualifier As String

        Private _measurementUnit As String

        Private _quantity As Decimal

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property Qualifier() As String
            Get
                Return Me._qualifier
            End Get
            Set(value As String)
                Me._qualifier = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property MeasurementUnit() As String
            Get
                Return Me._measurementUnit
            End Get
            Set(value As String)
                Me._measurementUnit = Value
            End Set
        End Property

        Public Property Quantity() As Decimal
            Get
                Return Me._quantity
            End Get
            Set(value As Decimal)
                Me._quantity = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemCustomsWarehouseGoodsItemCommercialAmount
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemInwardProcessingTransformation

#Region "Private fields"
        Private _alignmentFlag As DEXPREGoodsItemInwardProcessingTransformationAlignmentFlag

        Private _goodsItemQuantity As String

        Private _customsAuthorization As DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization

        Private _goodsItem As List(Of DEXPREGoodsItemInwardProcessingTransformationGoodsItem)

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._goodsItem = New List(Of DEXPREGoodsItemInwardProcessingTransformationGoodsItem)()
            Me._customsAuthorization = New DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization()
        End Sub

        Public Property AlignmentFlag() As DEXPREGoodsItemInwardProcessingTransformationAlignmentFlag
            Get
                Return Me._alignmentFlag
            End Get
            Set(value As DEXPREGoodsItemInwardProcessingTransformationAlignmentFlag)
                Me._alignmentFlag = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer")> _
        Public Property GoodsItemQuantity() As String
            Get
                Return Me._goodsItemQuantity
            End Get
            Set(value As String)
                Me._goodsItemQuantity = Value
            End Set
        End Property

        Public Property CustomsAuthorization() As DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization
            Get
                Return Me._customsAuthorization
            End Get
            Set(value As DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization)
                Me._customsAuthorization = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute("GoodsItem")> _
        Public Property GoodsItem() As List(Of DEXPREGoodsItemInwardProcessingTransformationGoodsItem)
            Get
                Return Me._goodsItem
            End Get
            Set(value As List(Of DEXPREGoodsItemInwardProcessingTransformationGoodsItem))
                Me._goodsItem = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemInwardProcessingTransformation))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemInwardProcessingTransformation object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemInwardProcessingTransformation object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemInwardProcessingTransformation object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemInwardProcessingTransformation, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemInwardProcessingTransformation)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemInwardProcessingTransformation) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemInwardProcessingTransformation
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemInwardProcessingTransformation)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemInwardProcessingTransformation
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemInwardProcessingTransformation)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemInwardProcessingTransformation object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemInwardProcessingTransformation object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemInwardProcessingTransformation object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemInwardProcessingTransformation, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemInwardProcessingTransformation)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemInwardProcessingTransformation) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemInwardProcessingTransformation
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREGoodsItemInwardProcessingTransformationAlignmentFlag

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0")> _
        Item0

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1")> _
        Item1
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization

#Region "Private fields"
        Private _processingOwner As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ProcessingOwner() As String
            Get
                Return Me._processingOwner
            End Get
            Set(value As String)
                Me._processingOwner = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemInwardProcessingTransformationCustomsAuthorization
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPREGoodsItemInwardProcessingTransformationGoodsItem

#Region "Private fields"
        Private _sequenceNumber As String

        Private _referencedSequenceNumber As String

        Private _registrationNumber As String

        Private _accessViaAtlasFlag As DEXPREGoodsItemInwardProcessingTransformationGoodsItemAccessViaAtlasFlag

        Private _goodsRelatedInformation As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer")> _
        Public Property SequenceNumber() As String
            Get
                Return Me._sequenceNumber
            End Get
            Set(value As String)
                Me._sequenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer")> _
        Public Property ReferencedSequenceNumber() As String
            Get
                Return Me._referencedSequenceNumber
            End Get
            Set(value As String)
                Me._referencedSequenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property RegistrationNumber() As String
            Get
                Return Me._registrationNumber
            End Get
            Set(value As String)
                Me._registrationNumber = Value
            End Set
        End Property

        Public Property AccessViaAtlasFlag() As DEXPREGoodsItemInwardProcessingTransformationGoodsItemAccessViaAtlasFlag
            Get
                Return Me._accessViaAtlasFlag
            End Get
            Set(value As DEXPREGoodsItemInwardProcessingTransformationGoodsItemAccessViaAtlasFlag)
                Me._accessViaAtlasFlag = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property GoodsRelatedInformation() As String
            Get
                Return Me._goodsRelatedInformation
            End Get
            Set(value As String)
                Me._goodsRelatedInformation = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPREGoodsItemInwardProcessingTransformationGoodsItem))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPREGoodsItemInwardProcessingTransformationGoodsItem object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPREGoodsItemInwardProcessingTransformationGoodsItem object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemInwardProcessingTransformationGoodsItem object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemInwardProcessingTransformationGoodsItem, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemInwardProcessingTransformationGoodsItem)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPREGoodsItemInwardProcessingTransformationGoodsItem) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPREGoodsItemInwardProcessingTransformationGoodsItem
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPREGoodsItemInwardProcessingTransformationGoodsItem)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPREGoodsItemInwardProcessingTransformationGoodsItem
            Return CType(Serializer.Deserialize(s), DEXPREGoodsItemInwardProcessingTransformationGoodsItem)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPREGoodsItemInwardProcessingTransformationGoodsItem object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPREGoodsItemInwardProcessingTransformationGoodsItem object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPREGoodsItemInwardProcessingTransformationGoodsItem object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemInwardProcessingTransformationGoodsItem, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPREGoodsItemInwardProcessingTransformationGoodsItem)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPREGoodsItemInwardProcessingTransformationGoodsItem) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPREGoodsItemInwardProcessingTransformationGoodsItem
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPREGoodsItemInwardProcessingTransformationGoodsItemAccessViaAtlasFlag

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("0")> _
        Item0

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1")> _
        Item1
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlRootAttribute([Namespace]:="", IsNullable:=True)> _
    Partial Public Class [decimal]

#Region "Private fields"
        Private _anyAttr As List(Of System.Xml.XmlAttribute)

        Private _value As Decimal

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._anyAttr = New List(Of System.Xml.XmlAttribute)()
        End Sub

        <System.Xml.Serialization.XmlAnyAttributeAttribute()> _
        Public Property AnyAttr() As List(Of System.Xml.XmlAttribute)
            Get
                Return Me._anyAttr
            End Get
            Set(value As List(Of System.Xml.XmlAttribute))
                Me._anyAttr = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlTextAttribute()> _
        Public Property Value() As Decimal
            Get
                Return Me._value
            End Get
            Set(value As Decimal)
                Me._value = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType([decimal]))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current decimal object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an decimal object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output decimal object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As [decimal], ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, [decimal])
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As [decimal]) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As [decimal]
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), [decimal])
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As [decimal]
            Return CType(Serializer.Deserialize(s), [decimal])
        End Function
#End Region

        ''' <summary>
        ''' Serializes current decimal object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an decimal object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output decimal object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As [decimal], ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, [decimal])
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As [decimal]) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As [decimal]
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlRootAttribute([Namespace]:="", IsNullable:=True)> _
    Partial Public Class [integer]

#Region "Private fields"
        Private _anyAttr As List(Of System.Xml.XmlAttribute)

        Private _value As String

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._anyAttr = New List(Of System.Xml.XmlAttribute)()
        End Sub

        <System.Xml.Serialization.XmlAnyAttributeAttribute()> _
        Public Property AnyAttr() As List(Of System.Xml.XmlAttribute)
            Get
                Return Me._anyAttr
            End Get
            Set(value As List(Of System.Xml.XmlAttribute))
                Me._anyAttr = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlTextAttribute(DataType:="integer")> _
        Public Property Value() As String
            Get
                Return Me._value
            End Get
            Set(value As String)
                Me._value = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType([integer]))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current integer object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an integer object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output integer object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As [integer], ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, [integer])
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As [integer]) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As [integer]
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), [integer])
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As [integer]
            Return CType(Serializer.Deserialize(s), [integer])
        End Function
#End Region

        ''' <summary>
        ''' Serializes current integer object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an integer object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output integer object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As [integer], ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, [integer])
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As [integer]) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As [integer]
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlRootAttribute([Namespace]:="", IsNullable:=True)> _
    Partial Public Class token

#Region "Private fields"
        Private _anyAttr As List(Of System.Xml.XmlAttribute)

        Private _value As String

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._anyAttr = New List(Of System.Xml.XmlAttribute)()
        End Sub

        <System.Xml.Serialization.XmlAnyAttributeAttribute()> _
        Public Property AnyAttr() As List(Of System.Xml.XmlAttribute)
            Get
                Return Me._anyAttr
            End Get
            Set(value As List(Of System.Xml.XmlAttribute))
                Me._anyAttr = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlTextAttribute(DataType:="token")> _
        Public Property Value() As String
            Get
                Return Me._value
            End Get
            Set(value As String)
                Me._value = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(token))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current token object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        Public Overridable Function Serialize() As String
            Dim streamReader As System.IO.StreamReader = Nothing
            Dim memoryStream As System.IO.MemoryStream = Nothing
            Try
                memoryStream = New System.IO.MemoryStream()
                Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
                xmlWriterSettings.Indent = True
                xmlWriterSettings.IndentChars = "  "
                Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings)
                Serializer.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream)
                Return streamReader.ReadToEnd
            Finally
                If (Not (streamReader) Is Nothing) Then
                    streamReader.Dispose()
                End If
                If (Not (memoryStream) Is Nothing) Then
                    memoryStream.Dispose()
                End If
            End Try
        End Function

        ''' <summary>
        ''' Deserializes workflow markup into an token object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output token object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As token, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, token)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As token) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As token
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), token)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As token
            Return CType(Serializer.Deserialize(s), token)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current token object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch e As System.Exception
                exception = e
                Return False
            End Try
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try
                Dim xmlString As String = Serialize()
                Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
                streamWriter = xmlFile.CreateText
                streamWriter.WriteLine(xmlString)
                streamWriter.Close()
            Finally
                If (Not (streamWriter) Is Nothing) Then
                    streamWriter.Dispose()
                End If
            End Try
        End Sub

        ''' <summary>
        ''' Deserializes xml markup from file into an token object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output token object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As token, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, token)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As token) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As token
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class
End Namespace
