'' ------------------------------------------------------------------------------
''  <auto-generated>
''    Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com
''    {"TargetFramework":"Net20","NameSpace":"FCFCDF","Language":"VisualBasic","CollectionBase":"","Properties":{"PrivateFieldCustomPrefix":""},"XmlAttribute":{"Enabled":true,"GenerateOrderXmlAttributes":true},"ClassParams":{"GenerateInSeparateFilesDirectory":""},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{"IndentChars":"Indent1Space"},"JsonOutput":{},"Enabled":true,"EnableEncoding":true},"Miscellaneous":{"CleanupCode":false}}
''  </auto-generated>
'' ------------------------------------------------------------------------------
#Disable Warning
Imports System
Imports System.Diagnostics
Imports System.Xml.Serialization
Imports System.Runtime.Serialization
Imports System.Collections
Imports System.Xml.Schema
Imports System.ComponentModel
Imports System.Xml
Imports System.IO
Imports System.Text
Imports System.Collections.Generic

Namespace FCFCDF
    
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.4084.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 FCFCDF
        
        #Region "Private fields"
        Private _metaData As FCFCDFMetaData
        
        Private _header As FCFCDFHeader
        
        Private _declarant As FCFCDFDeclarant
        
        Private _representative As FCFCDFRepresentative
        
        Private _principal As FCFCDFPrincipal
        
        Private _contactPerson As FCFCDFContactPerson
        
        Private _dutyDefermentApproval As List(Of FCFCDFDutyDefermentApproval)
        
        Private _borderTransportMeans As FCFCDFBorderTransportMeans
        
        Private _arrivalTransportMeans As FCFCDFArrivalTransportMeans
        
        Private _previousAdministrativeReferences As FCFCDFPreviousAdministrativeReferences
        
        Private _summaryDeclaration As FCFCDFSummaryDeclaration
        
        Private _customsWarehouse As FCFCDFCustomsWarehouse
        
        Private _inwardProcessing As FCFCDFInwardProcessing
        
        Private _body As FCFCDFBody
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._body = New FCFCDFBody()
            Me._inwardProcessing = New FCFCDFInwardProcessing()
            Me._customsWarehouse = New FCFCDFCustomsWarehouse()
            Me._summaryDeclaration = New FCFCDFSummaryDeclaration()
            Me._previousAdministrativeReferences = New FCFCDFPreviousAdministrativeReferences()
            Me._arrivalTransportMeans = New FCFCDFArrivalTransportMeans()
            Me._borderTransportMeans = New FCFCDFBorderTransportMeans()
            Me._dutyDefermentApproval = New List(Of FCFCDFDutyDefermentApproval)()
            Me._contactPerson = New FCFCDFContactPerson()
            Me._principal = New FCFCDFPrincipal()
            Me._representative = New FCFCDFRepresentative()
            Me._declarant = New FCFCDFDeclarant()
            Me._header = New FCFCDFHeader()
            Me._metaData = New FCFCDFMetaData()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property MetaData() As FCFCDFMetaData
            Get
                Return Me._metaData
            End Get
            Set
                Me._metaData = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=1)>  _
        Public Property Header() As FCFCDFHeader
            Get
                Return Me._header
            End Get
            Set
                Me._header = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=2)>  _
        Public Property Declarant() As FCFCDFDeclarant
            Get
                Return Me._declarant
            End Get
            Set
                Me._declarant = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=3)>  _
        Public Property Representative() As FCFCDFRepresentative
            Get
                Return Me._representative
            End Get
            Set
                Me._representative = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=4)>  _
        Public Property Principal() As FCFCDFPrincipal
            Get
                Return Me._principal
            End Get
            Set
                Me._principal = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=5)>  _
        Public Property ContactPerson() As FCFCDFContactPerson
            Get
                Return Me._contactPerson
            End Get
            Set
                Me._contactPerson = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute("DutyDefermentApproval", Order:=6)>  _
        Public Property DutyDefermentApproval() As List(Of FCFCDFDutyDefermentApproval)
            Get
                Return Me._dutyDefermentApproval
            End Get
            Set
                Me._dutyDefermentApproval = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=7)>  _
        Public Property BorderTransportMeans() As FCFCDFBorderTransportMeans
            Get
                Return Me._borderTransportMeans
            End Get
            Set
                Me._borderTransportMeans = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=8)>  _
        Public Property ArrivalTransportMeans() As FCFCDFArrivalTransportMeans
            Get
                Return Me._arrivalTransportMeans
            End Get
            Set
                Me._arrivalTransportMeans = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=9)>  _
        Public Property PreviousAdministrativeReferences() As FCFCDFPreviousAdministrativeReferences
            Get
                Return Me._previousAdministrativeReferences
            End Get
            Set
                Me._previousAdministrativeReferences = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=10)>  _
        Public Property SummaryDeclaration() As FCFCDFSummaryDeclaration
            Get
                Return Me._summaryDeclaration
            End Get
            Set
                Me._summaryDeclaration = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=11)>  _
        Public Property CustomsWarehouse() As FCFCDFCustomsWarehouse
            Get
                Return Me._customsWarehouse
            End Get
            Set
                Me._customsWarehouse = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=12)>  _
        Public Property InwardProcessing() As FCFCDFInwardProcessing
            Get
                Return Me._inwardProcessing
            End Get
            Set
                Me._inwardProcessing = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=13)>  _
        Public Property Body() As FCFCDFBody
            Get
                Return Me._body
            End Get
            Set
                Me._body = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDF))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDF object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDF object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDF 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 FCFCDF, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDF)
            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 FCFCDF) 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 FCFCDF
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDF)
            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 FCFCDF
            Return CType(SerializerXml.Deserialize(s),FCFCDF)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDF 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDF object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDF 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDF, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDF)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDF, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDF) 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 FCFCDF
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDF
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFMetaData
        
        #Region "Private fields"
        Private _preparation As FCFCDFMetaDataPreparation
        
        Private _interchangeControlReference As String
        
        Private _messageReferenceNumber As String
        
        Private _messageIdentifier As String
        
        Private _messageGroup As FCFCDFMetaDataMessageGroup
        
        Private _testIndicator As FCFCDFMetaDataTestIndicator
        
        Private _messageType As FCFCDFMetaDataMessageType
        
        Private _interchangeSender As FCFCDFMetaDataInterchangeSender
        
        Private _interchangeRecipient As FCFCDFMetaDataInterchangeRecipient
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._interchangeRecipient = New FCFCDFMetaDataInterchangeRecipient()
            Me._interchangeSender = New FCFCDFMetaDataInterchangeSender()
            Me._preparation = New FCFCDFMetaDataPreparation()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Preparation() As FCFCDFMetaDataPreparation
            Get
                Return Me._preparation
            End Get
            Set
                Me._preparation = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property InterchangeControlReference() As String
            Get
                Return Me._interchangeControlReference
            End Get
            Set
                Me._interchangeControlReference = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer", Order:=2)>  _
        Public Property MessageReferenceNumber() As String
            Get
                Return Me._messageReferenceNumber
            End Get
            Set
                Me._messageReferenceNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=3)>  _
        Public Property MessageIdentifier() As String
            Get
                Return Me._messageIdentifier
            End Get
            Set
                Me._messageIdentifier = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=4)>  _
        Public Property MessageGroup() As FCFCDFMetaDataMessageGroup
            Get
                Return Me._messageGroup
            End Get
            Set
                Me._messageGroup = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=5)>  _
        Public Property TestIndicator() As FCFCDFMetaDataTestIndicator
            Get
                Return Me._testIndicator
            End Get
            Set
                Me._testIndicator = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=6)>  _
        Public Property MessageType() As FCFCDFMetaDataMessageType
            Get
                Return Me._messageType
            End Get
            Set
                Me._messageType = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=7)>  _
        Public Property InterchangeSender() As FCFCDFMetaDataInterchangeSender
            Get
                Return Me._interchangeSender
            End Get
            Set
                Me._interchangeSender = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=8)>  _
        Public Property InterchangeRecipient() As FCFCDFMetaDataInterchangeRecipient
            Get
                Return Me._interchangeRecipient
            End Get
            Set
                Me._interchangeRecipient = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFMetaData))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFMetaData object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFMetaData object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFMetaData 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 FCFCDFMetaData, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFMetaData)
            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 FCFCDFMetaData) 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 FCFCDFMetaData
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFMetaData)
            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 FCFCDFMetaData
            Return CType(SerializerXml.Deserialize(s),FCFCDFMetaData)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFMetaData 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFMetaData object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFMetaData 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFMetaData, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFMetaData)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFMetaData, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFMetaData) 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 FCFCDFMetaData
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFMetaData
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFMetaDataPreparation
        
        #Region "Private fields"
        Private _date As Date
        
        Private _time As Date
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="date", Order:=0)>  _
        Public Property [Date]() As Date
            Get
                Return Me._date
            End Get
            Set
                Me._date = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="time", Order:=1)>  _
        Public Property Time() As Date
            Get
                Return Me._time
            End Get
            Set
                Me._time = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFMetaDataPreparation))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFMetaDataPreparation object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFMetaDataPreparation object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFMetaDataPreparation 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 FCFCDFMetaDataPreparation, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFMetaDataPreparation)
            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 FCFCDFMetaDataPreparation) 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 FCFCDFMetaDataPreparation
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFMetaDataPreparation)
            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 FCFCDFMetaDataPreparation
            Return CType(SerializerXml.Deserialize(s),FCFCDFMetaDataPreparation)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFMetaDataPreparation 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFMetaDataPreparation object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFMetaDataPreparation 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFMetaDataPreparation, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFMetaDataPreparation)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFMetaDataPreparation, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFMetaDataPreparation) 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 FCFCDFMetaDataPreparation
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFMetaDataPreparation
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Public Enum FCFCDFMetaDataMessageGroup
        
        '''<remarks/>
        ZBE
        
        '''<remarks/>
        ZBV
    End Enum
    
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Public Enum FCFCDFMetaDataTestIndicator
        
        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1")>  _
        Item1
    End Enum
    
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Public Enum FCFCDFMetaDataMessageType
        
        '''<remarks/>
        FCFCDF
    End Enum
    
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFMetaDataInterchangeSender
        
        #Region "Private fields"
        Private _identification As FCFCDFMetaDataInterchangeSenderIdentification
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._identification = New FCFCDFMetaDataInterchangeSenderIdentification()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Identification() As FCFCDFMetaDataInterchangeSenderIdentification
            Get
                Return Me._identification
            End Get
            Set
                Me._identification = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFMetaDataInterchangeSender))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFMetaDataInterchangeSender object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFMetaDataInterchangeSender object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFMetaDataInterchangeSender 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 FCFCDFMetaDataInterchangeSender, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFMetaDataInterchangeSender)
            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 FCFCDFMetaDataInterchangeSender) 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 FCFCDFMetaDataInterchangeSender
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFMetaDataInterchangeSender)
            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 FCFCDFMetaDataInterchangeSender
            Return CType(SerializerXml.Deserialize(s),FCFCDFMetaDataInterchangeSender)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFMetaDataInterchangeSender 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFMetaDataInterchangeSender object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFMetaDataInterchangeSender 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFMetaDataInterchangeSender, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFMetaDataInterchangeSender)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFMetaDataInterchangeSender, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFMetaDataInterchangeSender) 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 FCFCDFMetaDataInterchangeSender
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFMetaDataInterchangeSender
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFMetaDataInterchangeSenderIdentification
        
        #Region "Private fields"
        Private _referenceNumber As String
        
        Private _subsidiaryNumber As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set
                Me._referenceNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property SubsidiaryNumber() As String
            Get
                Return Me._subsidiaryNumber
            End Get
            Set
                Me._subsidiaryNumber = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFMetaDataInterchangeSenderIdentification))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFMetaDataInterchangeSenderIdentification object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFMetaDataInterchangeSenderIdentification object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFMetaDataInterchangeSenderIdentification 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 FCFCDFMetaDataInterchangeSenderIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFMetaDataInterchangeSenderIdentification)
            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 FCFCDFMetaDataInterchangeSenderIdentification) 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 FCFCDFMetaDataInterchangeSenderIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFMetaDataInterchangeSenderIdentification)
            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 FCFCDFMetaDataInterchangeSenderIdentification
            Return CType(SerializerXml.Deserialize(s),FCFCDFMetaDataInterchangeSenderIdentification)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFMetaDataInterchangeSenderIdentification 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFMetaDataInterchangeSenderIdentification object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFMetaDataInterchangeSenderIdentification 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFMetaDataInterchangeSenderIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFMetaDataInterchangeSenderIdentification)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFMetaDataInterchangeSenderIdentification, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFMetaDataInterchangeSenderIdentification) 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 FCFCDFMetaDataInterchangeSenderIdentification
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFMetaDataInterchangeSenderIdentification
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFMetaDataInterchangeRecipient
        
        #Region "Private fields"
        Private _identification As FCFCDFMetaDataInterchangeRecipientIdentification
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._identification = New FCFCDFMetaDataInterchangeRecipientIdentification()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Identification() As FCFCDFMetaDataInterchangeRecipientIdentification
            Get
                Return Me._identification
            End Get
            Set
                Me._identification = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFMetaDataInterchangeRecipient))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFMetaDataInterchangeRecipient object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFMetaDataInterchangeRecipient object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFMetaDataInterchangeRecipient 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 FCFCDFMetaDataInterchangeRecipient, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFMetaDataInterchangeRecipient)
            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 FCFCDFMetaDataInterchangeRecipient) 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 FCFCDFMetaDataInterchangeRecipient
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFMetaDataInterchangeRecipient)
            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 FCFCDFMetaDataInterchangeRecipient
            Return CType(SerializerXml.Deserialize(s),FCFCDFMetaDataInterchangeRecipient)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFMetaDataInterchangeRecipient 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFMetaDataInterchangeRecipient object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFMetaDataInterchangeRecipient 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFMetaDataInterchangeRecipient, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFMetaDataInterchangeRecipient)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFMetaDataInterchangeRecipient, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFMetaDataInterchangeRecipient) 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 FCFCDFMetaDataInterchangeRecipient
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFMetaDataInterchangeRecipient
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFMetaDataInterchangeRecipientIdentification
        
        #Region "Private fields"
        Private _referenceNumber As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set
                Me._referenceNumber = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFMetaDataInterchangeRecipientIdentification))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFMetaDataInterchangeRecipientIdentification object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFMetaDataInterchangeRecipientIdentification object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFMetaDataInterchangeRecipientIdentification 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 FCFCDFMetaDataInterchangeRecipientIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFMetaDataInterchangeRecipientIdentification)
            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 FCFCDFMetaDataInterchangeRecipientIdentification) 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 FCFCDFMetaDataInterchangeRecipientIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFMetaDataInterchangeRecipientIdentification)
            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 FCFCDFMetaDataInterchangeRecipientIdentification
            Return CType(SerializerXml.Deserialize(s),FCFCDFMetaDataInterchangeRecipientIdentification)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFMetaDataInterchangeRecipientIdentification 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFMetaDataInterchangeRecipientIdentification object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFMetaDataInterchangeRecipientIdentification 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFMetaDataInterchangeRecipientIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFMetaDataInterchangeRecipientIdentification)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFMetaDataInterchangeRecipientIdentification, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFMetaDataInterchangeRecipientIdentification) 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 FCFCDFMetaDataInterchangeRecipientIdentification
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFMetaDataInterchangeRecipientIdentification
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFHeader
        
        #Region "Private fields"
        Private _messageVersion As String
        
        Private _messageCreationDate As Date
        
        Private _lRN As String
        
        Private _declaration As FCFCDFHeaderDeclaration
        
        Private _prematureInputFlag As String
        
        Private _goodsItemQuantity As String
        
        Private _customsGoodsStatus As String
        
        Private _declarantIsConsigneeFlag As String
        
        Private _customsAuthorisation As FCFCDFHeaderCustomsAuthorisation
        
        Private _inputTaxDeductionFlag As String
        
        Private _goodsLocation As String
        
        Private _departureCountry As String
        
        Private _paymentMethod As FCFCDFHeaderPaymentMethod
        
        Private _currencyCode As FCFCDFHeaderCurrencyCode
        
        Private _additionalInformation As String
        
        Private _taxOffice As String
        
        Private _representativeRelationshipFlag As String
        
        Private _declarationPlace As String
        
        Private _authorisationNumber As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._customsAuthorisation = New FCFCDFHeaderCustomsAuthorisation()
            Me._declaration = New FCFCDFHeaderDeclaration()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property MessageVersion() As String
            Get
                Return Me._messageVersion
            End Get
            Set
                Me._messageVersion = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="date", Order:=1)>  _
        Public Property MessageCreationDate() As Date
            Get
                Return Me._messageCreationDate
            End Get
            Set
                Me._messageCreationDate = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property LRN() As String
            Get
                Return Me._lRN
            End Get
            Set
                Me._lRN = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=3)>  _
        Public Property Declaration() As FCFCDFHeaderDeclaration
            Get
                Return Me._declaration
            End Get
            Set
                Me._declaration = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=4)>  _
        Public Property PrematureInputFlag() As String
            Get
                Return Me._prematureInputFlag
            End Get
            Set
                Me._prematureInputFlag = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer", Order:=5)>  _
        Public Property GoodsItemQuantity() As String
            Get
                Return Me._goodsItemQuantity
            End Get
            Set
                Me._goodsItemQuantity = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=6)>  _
        Public Property CustomsGoodsStatus() As String
            Get
                Return Me._customsGoodsStatus
            End Get
            Set
                Me._customsGoodsStatus = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=7)>  _
        Public Property DeclarantIsConsigneeFlag() As String
            Get
                Return Me._declarantIsConsigneeFlag
            End Get
            Set
                Me._declarantIsConsigneeFlag = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=8)>  _
        Public Property CustomsAuthorisation() As FCFCDFHeaderCustomsAuthorisation
            Get
                Return Me._customsAuthorisation
            End Get
            Set
                Me._customsAuthorisation = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=9)>  _
        Public Property InputTaxDeductionFlag() As String
            Get
                Return Me._inputTaxDeductionFlag
            End Get
            Set
                Me._inputTaxDeductionFlag = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=10)>  _
        Public Property GoodsLocation() As String
            Get
                Return Me._goodsLocation
            End Get
            Set
                Me._goodsLocation = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=11)>  _
        Public Property DepartureCountry() As String
            Get
                Return Me._departureCountry
            End Get
            Set
                Me._departureCountry = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=12)>  _
        Public Property PaymentMethod() As FCFCDFHeaderPaymentMethod
            Get
                Return Me._paymentMethod
            End Get
            Set
                Me._paymentMethod = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=13)>  _
        Public Property CurrencyCode() As FCFCDFHeaderCurrencyCode
            Get
                Return Me._currencyCode
            End Get
            Set
                Me._currencyCode = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=14)>  _
        Public Property AdditionalInformation() As String
            Get
                Return Me._additionalInformation
            End Get
            Set
                Me._additionalInformation = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=15)>  _
        Public Property TaxOffice() As String
            Get
                Return Me._taxOffice
            End Get
            Set
                Me._taxOffice = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=16)>  _
        Public Property RepresentativeRelationshipFlag() As String
            Get
                Return Me._representativeRelationshipFlag
            End Get
            Set
                Me._representativeRelationshipFlag = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=17)>  _
        Public Property DeclarationPlace() As String
            Get
                Return Me._declarationPlace
            End Get
            Set
                Me._declarationPlace = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=18)>  _
        Public Property AuthorisationNumber() As String
            Get
                Return Me._authorisationNumber
            End Get
            Set
                Me._authorisationNumber = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFHeader))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFHeader object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFHeader object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFHeader 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 FCFCDFHeader, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFHeader)
            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 FCFCDFHeader) 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 FCFCDFHeader
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFHeader)
            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 FCFCDFHeader
            Return CType(SerializerXml.Deserialize(s),FCFCDFHeader)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFHeader 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFHeader object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFHeader 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFHeader, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFHeader)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFHeader, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFHeader) 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 FCFCDFHeader
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFHeader
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFHeaderDeclaration
        
        #Region "Private fields"
        Private _kind As FCFCDFHeaderDeclarationKind
        
        Private _type As FCFCDFHeaderDeclarationType
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Kind() As FCFCDFHeaderDeclarationKind
            Get
                Return Me._kind
            End Get
            Set
                Me._kind = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=1)>  _
        Public Property Type() As FCFCDFHeaderDeclarationType
            Get
                Return Me._type
            End Get
            Set
                Me._type = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFHeaderDeclaration))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFHeaderDeclaration object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFHeaderDeclaration object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFHeaderDeclaration 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 FCFCDFHeaderDeclaration, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFHeaderDeclaration)
            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 FCFCDFHeaderDeclaration) 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 FCFCDFHeaderDeclaration
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFHeaderDeclaration)
            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 FCFCDFHeaderDeclaration
            Return CType(SerializerXml.Deserialize(s),FCFCDFHeaderDeclaration)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFHeaderDeclaration 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFHeaderDeclaration object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFHeaderDeclaration 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFHeaderDeclaration, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFHeaderDeclaration)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFHeaderDeclaration, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFHeaderDeclaration) 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 FCFCDFHeaderDeclaration
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFHeaderDeclaration
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Public Enum FCFCDFHeaderDeclarationKind
        
        '''<remarks/>
        A
        
        '''<remarks/>
        B
        
        '''<remarks/>
        D
        
        '''<remarks/>
        E
    End Enum
    
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Public Enum FCFCDFHeaderDeclarationType
        
        '''<remarks/>
        EZA
    End Enum
    
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFHeaderCustomsAuthorisation
        
        #Region "Private fields"
        Private _endUse As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property EndUse() As String
            Get
                Return Me._endUse
            End Get
            Set
                Me._endUse = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFHeaderCustomsAuthorisation))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFHeaderCustomsAuthorisation object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFHeaderCustomsAuthorisation object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFHeaderCustomsAuthorisation 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 FCFCDFHeaderCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFHeaderCustomsAuthorisation)
            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 FCFCDFHeaderCustomsAuthorisation) 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 FCFCDFHeaderCustomsAuthorisation
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFHeaderCustomsAuthorisation)
            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 FCFCDFHeaderCustomsAuthorisation
            Return CType(SerializerXml.Deserialize(s),FCFCDFHeaderCustomsAuthorisation)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFHeaderCustomsAuthorisation 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFHeaderCustomsAuthorisation object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFHeaderCustomsAuthorisation 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFHeaderCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFHeaderCustomsAuthorisation)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFHeaderCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFHeaderCustomsAuthorisation) 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 FCFCDFHeaderCustomsAuthorisation
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFHeaderCustomsAuthorisation
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Public Enum FCFCDFHeaderPaymentMethod
        
        '''<remarks/>
        A
        
        '''<remarks/>
        C
        
        '''<remarks/>
        D
        
        '''<remarks/>
        E
        
        '''<remarks/>
        F
        
        '''<remarks/>
        G
    End Enum
    
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Public Enum FCFCDFHeaderCurrencyCode
        
        '''<remarks/>
        EUR
    End Enum
    
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFDeclarant
        
        #Region "Private fields"
        Private _identification As FCFCDFDeclarantIdentification
        
        Private _name As String
        
        Private _address As FCFCDFDeclarantAddress
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._address = New FCFCDFDeclarantAddress()
            Me._identification = New FCFCDFDeclarantIdentification()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Identification() As FCFCDFDeclarantIdentification
            Get
                Return Me._identification
            End Get
            Set
                Me._identification = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set
                Me._name = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=2)>  _
        Public Property Address() As FCFCDFDeclarantAddress
            Get
                Return Me._address
            End Get
            Set
                Me._address = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFDeclarant))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFDeclarant object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFDeclarant object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFDeclarant 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 FCFCDFDeclarant, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFDeclarant)
            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 FCFCDFDeclarant) 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 FCFCDFDeclarant
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFDeclarant)
            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 FCFCDFDeclarant
            Return CType(SerializerXml.Deserialize(s),FCFCDFDeclarant)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFDeclarant 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFDeclarant object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFDeclarant 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFDeclarant, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFDeclarant)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFDeclarant, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFDeclarant) 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 FCFCDFDeclarant
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFDeclarant
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFDeclarantIdentification
        
        #Region "Private fields"
        Private _referenceNumber As String
        
        Private _subsidiaryNumber As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set
                Me._referenceNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property SubsidiaryNumber() As String
            Get
                Return Me._subsidiaryNumber
            End Get
            Set
                Me._subsidiaryNumber = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFDeclarantIdentification))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFDeclarantIdentification object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFDeclarantIdentification object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFDeclarantIdentification 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 FCFCDFDeclarantIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFDeclarantIdentification)
            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 FCFCDFDeclarantIdentification) 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 FCFCDFDeclarantIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFDeclarantIdentification)
            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 FCFCDFDeclarantIdentification
            Return CType(SerializerXml.Deserialize(s),FCFCDFDeclarantIdentification)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFDeclarantIdentification 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFDeclarantIdentification object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFDeclarantIdentification 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFDeclarantIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFDeclarantIdentification)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFDeclarantIdentification, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFDeclarantIdentification) 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 FCFCDFDeclarantIdentification
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFDeclarantIdentification
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFDeclarantAddress
        
        #Region "Private fields"
        Private _line As String
        
        Private _country As String
        
        Private _postcode As String
        
        Private _city As String
        
        Private _district As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Line() As String
            Get
                Return Me._line
            End Get
            Set
                Me._line = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Country() As String
            Get
                Return Me._country
            End Get
            Set
                Me._country = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property Postcode() As String
            Get
                Return Me._postcode
            End Get
            Set
                Me._postcode = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=3)>  _
        Public Property City() As String
            Get
                Return Me._city
            End Get
            Set
                Me._city = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=4)>  _
        Public Property District() As String
            Get
                Return Me._district
            End Get
            Set
                Me._district = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFDeclarantAddress))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFDeclarantAddress object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFDeclarantAddress object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFDeclarantAddress 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 FCFCDFDeclarantAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFDeclarantAddress)
            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 FCFCDFDeclarantAddress) 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 FCFCDFDeclarantAddress
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFDeclarantAddress)
            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 FCFCDFDeclarantAddress
            Return CType(SerializerXml.Deserialize(s),FCFCDFDeclarantAddress)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFDeclarantAddress 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFDeclarantAddress object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFDeclarantAddress 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFDeclarantAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFDeclarantAddress)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFDeclarantAddress, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFDeclarantAddress) 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 FCFCDFDeclarantAddress
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFDeclarantAddress
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFRepresentative
        
        #Region "Private fields"
        Private _identification As FCFCDFRepresentativeIdentification
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._identification = New FCFCDFRepresentativeIdentification()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Identification() As FCFCDFRepresentativeIdentification
            Get
                Return Me._identification
            End Get
            Set
                Me._identification = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFRepresentative))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFRepresentative object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFRepresentative object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFRepresentative 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 FCFCDFRepresentative, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFRepresentative)
            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 FCFCDFRepresentative) 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 FCFCDFRepresentative
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFRepresentative)
            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 FCFCDFRepresentative
            Return CType(SerializerXml.Deserialize(s),FCFCDFRepresentative)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFRepresentative 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFRepresentative object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFRepresentative 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFRepresentative, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFRepresentative)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFRepresentative, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFRepresentative) 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 FCFCDFRepresentative
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFRepresentative
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFRepresentativeIdentification
        
        #Region "Private fields"
        Private _referenceNumber As String
        
        Private _subsidiaryNumber As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set
                Me._referenceNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property SubsidiaryNumber() As String
            Get
                Return Me._subsidiaryNumber
            End Get
            Set
                Me._subsidiaryNumber = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFRepresentativeIdentification))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFRepresentativeIdentification object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFRepresentativeIdentification object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFRepresentativeIdentification 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 FCFCDFRepresentativeIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFRepresentativeIdentification)
            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 FCFCDFRepresentativeIdentification) 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 FCFCDFRepresentativeIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFRepresentativeIdentification)
            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 FCFCDFRepresentativeIdentification
            Return CType(SerializerXml.Deserialize(s),FCFCDFRepresentativeIdentification)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFRepresentativeIdentification 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFRepresentativeIdentification object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFRepresentativeIdentification 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFRepresentativeIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFRepresentativeIdentification)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFRepresentativeIdentification, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFRepresentativeIdentification) 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 FCFCDFRepresentativeIdentification
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFRepresentativeIdentification
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFPrincipal
        
        #Region "Private fields"
        Private _identification As FCFCDFPrincipalIdentification
        
        Private _name As String
        
        Private _address As FCFCDFPrincipalAddress
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._address = New FCFCDFPrincipalAddress()
            Me._identification = New FCFCDFPrincipalIdentification()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Identification() As FCFCDFPrincipalIdentification
            Get
                Return Me._identification
            End Get
            Set
                Me._identification = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set
                Me._name = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=2)>  _
        Public Property Address() As FCFCDFPrincipalAddress
            Get
                Return Me._address
            End Get
            Set
                Me._address = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFPrincipal))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFPrincipal object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFPrincipal object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFPrincipal 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 FCFCDFPrincipal, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFPrincipal)
            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 FCFCDFPrincipal) 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 FCFCDFPrincipal
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFPrincipal)
            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 FCFCDFPrincipal
            Return CType(SerializerXml.Deserialize(s),FCFCDFPrincipal)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFPrincipal 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFPrincipal object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFPrincipal 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFPrincipal, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFPrincipal)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFPrincipal, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFPrincipal) 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 FCFCDFPrincipal
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFPrincipal
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFPrincipalIdentification
        
        #Region "Private fields"
        Private _referenceNumber As String
        
        Private _subsidiaryNumber As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set
                Me._referenceNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property SubsidiaryNumber() As String
            Get
                Return Me._subsidiaryNumber
            End Get
            Set
                Me._subsidiaryNumber = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFPrincipalIdentification))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFPrincipalIdentification object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFPrincipalIdentification object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFPrincipalIdentification 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 FCFCDFPrincipalIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFPrincipalIdentification)
            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 FCFCDFPrincipalIdentification) 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 FCFCDFPrincipalIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFPrincipalIdentification)
            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 FCFCDFPrincipalIdentification
            Return CType(SerializerXml.Deserialize(s),FCFCDFPrincipalIdentification)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFPrincipalIdentification 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFPrincipalIdentification object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFPrincipalIdentification 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFPrincipalIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFPrincipalIdentification)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFPrincipalIdentification, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFPrincipalIdentification) 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 FCFCDFPrincipalIdentification
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFPrincipalIdentification
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFPrincipalAddress
        
        #Region "Private fields"
        Private _line As String
        
        Private _country As String
        
        Private _postcode As String
        
        Private _city As String
        
        Private _district As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Line() As String
            Get
                Return Me._line
            End Get
            Set
                Me._line = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Country() As String
            Get
                Return Me._country
            End Get
            Set
                Me._country = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property Postcode() As String
            Get
                Return Me._postcode
            End Get
            Set
                Me._postcode = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=3)>  _
        Public Property City() As String
            Get
                Return Me._city
            End Get
            Set
                Me._city = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=4)>  _
        Public Property District() As String
            Get
                Return Me._district
            End Get
            Set
                Me._district = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFPrincipalAddress))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFPrincipalAddress object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFPrincipalAddress object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFPrincipalAddress 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 FCFCDFPrincipalAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFPrincipalAddress)
            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 FCFCDFPrincipalAddress) 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 FCFCDFPrincipalAddress
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFPrincipalAddress)
            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 FCFCDFPrincipalAddress
            Return CType(SerializerXml.Deserialize(s),FCFCDFPrincipalAddress)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFPrincipalAddress 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFPrincipalAddress object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFPrincipalAddress 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFPrincipalAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFPrincipalAddress)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFPrincipalAddress, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFPrincipalAddress) 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 FCFCDFPrincipalAddress
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFPrincipalAddress
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFContactPerson
        
        #Region "Private fields"
        Private _name As String
        
        Private _position As String
        
        Private _phoneNumber As String
        
        Private _mailAddress As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set
                Me._name = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Position() As String
            Get
                Return Me._position
            End Get
            Set
                Me._position = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property PhoneNumber() As String
            Get
                Return Me._phoneNumber
            End Get
            Set
                Me._phoneNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=3)>  _
        Public Property MailAddress() As String
            Get
                Return Me._mailAddress
            End Get
            Set
                Me._mailAddress = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFContactPerson))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFContactPerson object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFContactPerson object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFContactPerson 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 FCFCDFContactPerson, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFContactPerson)
            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 FCFCDFContactPerson) 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 FCFCDFContactPerson
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFContactPerson)
            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 FCFCDFContactPerson
            Return CType(SerializerXml.Deserialize(s),FCFCDFContactPerson)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFContactPerson 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFContactPerson object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFContactPerson 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFContactPerson, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFContactPerson)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFContactPerson, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFContactPerson) 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 FCFCDFContactPerson
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFContactPerson
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFDutyDefermentApproval
        
        #Region "Private fields"
        Private _type As String
        
        Private _applicationType As String
        
        Private _accountPrefix As String
        
        Private _accountNumber As String
        
        Private _authorisationNumber As String
        
        Private _dutyDefermentApplicant As FCFCDFDutyDefermentApprovalDutyDefermentApplicant
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._dutyDefermentApplicant = New FCFCDFDutyDefermentApprovalDutyDefermentApplicant()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Type() As String
            Get
                Return Me._type
            End Get
            Set
                Me._type = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property ApplicationType() As String
            Get
                Return Me._applicationType
            End Get
            Set
                Me._applicationType = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property AccountPrefix() As String
            Get
                Return Me._accountPrefix
            End Get
            Set
                Me._accountPrefix = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=3)>  _
        Public Property AccountNumber() As String
            Get
                Return Me._accountNumber
            End Get
            Set
                Me._accountNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=4)>  _
        Public Property AuthorisationNumber() As String
            Get
                Return Me._authorisationNumber
            End Get
            Set
                Me._authorisationNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=5)>  _
        Public Property DutyDefermentApplicant() As FCFCDFDutyDefermentApprovalDutyDefermentApplicant
            Get
                Return Me._dutyDefermentApplicant
            End Get
            Set
                Me._dutyDefermentApplicant = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFDutyDefermentApproval))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFDutyDefermentApproval object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFDutyDefermentApproval object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFDutyDefermentApproval 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 FCFCDFDutyDefermentApproval, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFDutyDefermentApproval)
            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 FCFCDFDutyDefermentApproval) 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 FCFCDFDutyDefermentApproval
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFDutyDefermentApproval)
            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 FCFCDFDutyDefermentApproval
            Return CType(SerializerXml.Deserialize(s),FCFCDFDutyDefermentApproval)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFDutyDefermentApproval 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFDutyDefermentApproval object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFDutyDefermentApproval 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFDutyDefermentApproval, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFDutyDefermentApproval)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFDutyDefermentApproval, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFDutyDefermentApproval) 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 FCFCDFDutyDefermentApproval
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFDutyDefermentApproval
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFDutyDefermentApprovalDutyDefermentApplicant
        
        #Region "Private fields"
        Private _identification As FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._identification = New FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Identification() As FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification
            Get
                Return Me._identification
            End Get
            Set
                Me._identification = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFDutyDefermentApprovalDutyDefermentApplicant))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFDutyDefermentApprovalDutyDefermentApplicant object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFDutyDefermentApprovalDutyDefermentApplicant object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFDutyDefermentApprovalDutyDefermentApplicant 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 FCFCDFDutyDefermentApprovalDutyDefermentApplicant, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFDutyDefermentApprovalDutyDefermentApplicant)
            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 FCFCDFDutyDefermentApprovalDutyDefermentApplicant) 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 FCFCDFDutyDefermentApprovalDutyDefermentApplicant
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFDutyDefermentApprovalDutyDefermentApplicant)
            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 FCFCDFDutyDefermentApprovalDutyDefermentApplicant
            Return CType(SerializerXml.Deserialize(s),FCFCDFDutyDefermentApprovalDutyDefermentApplicant)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFDutyDefermentApprovalDutyDefermentApplicant 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFDutyDefermentApprovalDutyDefermentApplicant object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFDutyDefermentApprovalDutyDefermentApplicant 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFDutyDefermentApprovalDutyDefermentApplicant, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFDutyDefermentApprovalDutyDefermentApplicant)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFDutyDefermentApprovalDutyDefermentApplicant, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFDutyDefermentApprovalDutyDefermentApplicant) 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 FCFCDFDutyDefermentApprovalDutyDefermentApplicant
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFDutyDefermentApprovalDutyDefermentApplicant
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification
        
        #Region "Private fields"
        Private _referenceNumber As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set
                Me._referenceNumber = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification 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 FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification)
            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 FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification) 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 FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification)
            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 FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification
            Return CType(SerializerXml.Deserialize(s),FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification) 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 FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFDutyDefermentApprovalDutyDefermentApplicantIdentification
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBorderTransportMeans
        
        #Region "Private fields"
        Private _mode As String
        
        Private _type As String
        
        Private _information As String
        
        Private _nationality As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Mode() As String
            Get
                Return Me._mode
            End Get
            Set
                Me._mode = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Type() As String
            Get
                Return Me._type
            End Get
            Set
                Me._type = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property Information() As String
            Get
                Return Me._information
            End Get
            Set
                Me._information = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=3)>  _
        Public Property Nationality() As String
            Get
                Return Me._nationality
            End Get
            Set
                Me._nationality = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBorderTransportMeans))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBorderTransportMeans object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBorderTransportMeans object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBorderTransportMeans 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 FCFCDFBorderTransportMeans, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBorderTransportMeans)
            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 FCFCDFBorderTransportMeans) 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 FCFCDFBorderTransportMeans
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBorderTransportMeans)
            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 FCFCDFBorderTransportMeans
            Return CType(SerializerXml.Deserialize(s),FCFCDFBorderTransportMeans)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBorderTransportMeans 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBorderTransportMeans object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBorderTransportMeans 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBorderTransportMeans, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBorderTransportMeans)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBorderTransportMeans, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBorderTransportMeans) 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 FCFCDFBorderTransportMeans
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBorderTransportMeans
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFArrivalTransportMeans
        
        #Region "Private fields"
        Private _identity As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Identity() As String
            Get
                Return Me._identity
            End Get
            Set
                Me._identity = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFArrivalTransportMeans))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFArrivalTransportMeans object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFArrivalTransportMeans object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFArrivalTransportMeans 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 FCFCDFArrivalTransportMeans, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFArrivalTransportMeans)
            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 FCFCDFArrivalTransportMeans) 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 FCFCDFArrivalTransportMeans
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFArrivalTransportMeans)
            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 FCFCDFArrivalTransportMeans
            Return CType(SerializerXml.Deserialize(s),FCFCDFArrivalTransportMeans)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFArrivalTransportMeans 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFArrivalTransportMeans object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFArrivalTransportMeans 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFArrivalTransportMeans, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFArrivalTransportMeans)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFArrivalTransportMeans, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFArrivalTransportMeans) 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 FCFCDFArrivalTransportMeans
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFArrivalTransportMeans
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFPreviousAdministrativeReferences
        
        #Region "Private fields"
        Private _type As String
        
        Private _previousAdministrativeReference As FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._previousAdministrativeReference = New FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Type() As String
            Get
                Return Me._type
            End Get
            Set
                Me._type = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=1)>  _
        Public Property PreviousAdministrativeReference() As FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference
            Get
                Return Me._previousAdministrativeReference
            End Get
            Set
                Me._previousAdministrativeReference = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFPreviousAdministrativeReferences))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFPreviousAdministrativeReferences object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFPreviousAdministrativeReferences object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFPreviousAdministrativeReferences 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 FCFCDFPreviousAdministrativeReferences, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFPreviousAdministrativeReferences)
            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 FCFCDFPreviousAdministrativeReferences) 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 FCFCDFPreviousAdministrativeReferences
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFPreviousAdministrativeReferences)
            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 FCFCDFPreviousAdministrativeReferences
            Return CType(SerializerXml.Deserialize(s),FCFCDFPreviousAdministrativeReferences)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFPreviousAdministrativeReferences 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFPreviousAdministrativeReferences object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFPreviousAdministrativeReferences 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFPreviousAdministrativeReferences, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFPreviousAdministrativeReferences)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFPreviousAdministrativeReferences, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFPreviousAdministrativeReferences) 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 FCFCDFPreviousAdministrativeReferences
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFPreviousAdministrativeReferences
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference
        
        #Region "Private fields"
        Private _referenceNumber As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set
                Me._referenceNumber = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference 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 FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference)
            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 FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference) 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 FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference)
            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 FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference
            Return CType(SerializerXml.Deserialize(s),FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference) 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 FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFPreviousAdministrativeReferencesPreviousAdministrativeReference
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFSummaryDeclaration
        
        #Region "Private fields"
        Private _identificationIndicator As FCFCDFSummaryDeclarationIdentificationIndicator
        
        Private _goodsItem As List(Of FCFCDFSummaryDeclarationGoodsItem)
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._goodsItem = New List(Of FCFCDFSummaryDeclarationGoodsItem)()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property IdentificationIndicator() As FCFCDFSummaryDeclarationIdentificationIndicator
            Get
                Return Me._identificationIndicator
            End Get
            Set
                Me._identificationIndicator = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute("GoodsItem", Order:=1)>  _
        Public Property GoodsItem() As List(Of FCFCDFSummaryDeclarationGoodsItem)
            Get
                Return Me._goodsItem
            End Get
            Set
                Me._goodsItem = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFSummaryDeclaration))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFSummaryDeclaration object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFSummaryDeclaration object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFSummaryDeclaration 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 FCFCDFSummaryDeclaration, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFSummaryDeclaration)
            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 FCFCDFSummaryDeclaration) 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 FCFCDFSummaryDeclaration
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFSummaryDeclaration)
            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 FCFCDFSummaryDeclaration
            Return CType(SerializerXml.Deserialize(s),FCFCDFSummaryDeclaration)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFSummaryDeclaration 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFSummaryDeclaration object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFSummaryDeclaration 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFSummaryDeclaration, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFSummaryDeclaration)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFSummaryDeclaration, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFSummaryDeclaration) 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 FCFCDFSummaryDeclaration
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFSummaryDeclaration
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Public Enum FCFCDFSummaryDeclarationIdentificationIndicator
        
        '''<remarks/>
        AWB
        
        '''<remarks/>
        REG
    End Enum
    
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFSummaryDeclarationGoodsItem
        
        #Region "Private fields"
        Private _quantity As String
        
        Private _identificationByKey As FCFCDFSummaryDeclarationGoodsItemIdentificationByKey
        
        Private _identificationByRegistration As FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._identificationByRegistration = New FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration()
            Me._identificationByKey = New FCFCDFSummaryDeclarationGoodsItemIdentificationByKey()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer", Order:=0)>  _
        Public Property Quantity() As String
            Get
                Return Me._quantity
            End Get
            Set
                Me._quantity = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=1)>  _
        Public Property IdentificationByKey() As FCFCDFSummaryDeclarationGoodsItemIdentificationByKey
            Get
                Return Me._identificationByKey
            End Get
            Set
                Me._identificationByKey = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=2)>  _
        Public Property IdentificationByRegistration() As FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration
            Get
                Return Me._identificationByRegistration
            End Get
            Set
                Me._identificationByRegistration = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFSummaryDeclarationGoodsItem))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFSummaryDeclarationGoodsItem object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFSummaryDeclarationGoodsItem object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFSummaryDeclarationGoodsItem 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 FCFCDFSummaryDeclarationGoodsItem, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFSummaryDeclarationGoodsItem)
            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 FCFCDFSummaryDeclarationGoodsItem) 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 FCFCDFSummaryDeclarationGoodsItem
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFSummaryDeclarationGoodsItem)
            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 FCFCDFSummaryDeclarationGoodsItem
            Return CType(SerializerXml.Deserialize(s),FCFCDFSummaryDeclarationGoodsItem)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFSummaryDeclarationGoodsItem 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFSummaryDeclarationGoodsItem object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFSummaryDeclarationGoodsItem 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFSummaryDeclarationGoodsItem, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFSummaryDeclarationGoodsItem)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFSummaryDeclarationGoodsItem, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItem) 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 FCFCDFSummaryDeclarationGoodsItem
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFSummaryDeclarationGoodsItem
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFSummaryDeclarationGoodsItemIdentificationByKey
        
        #Region "Private fields"
        Private _kind As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyKind
        
        Private _number As String
        
        Private _custodian As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._custodian = New FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Kind() As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyKind
            Get
                Return Me._kind
            End Get
            Set
                Me._kind = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Number() As String
            Get
                Return Me._number
            End Get
            Set
                Me._number = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=2)>  _
        Public Property Custodian() As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian
            Get
                Return Me._custodian
            End Get
            Set
                Me._custodian = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFSummaryDeclarationGoodsItemIdentificationByKey))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFSummaryDeclarationGoodsItemIdentificationByKey object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFSummaryDeclarationGoodsItemIdentificationByKey object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFSummaryDeclarationGoodsItemIdentificationByKey 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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKey, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFSummaryDeclarationGoodsItemIdentificationByKey)
            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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKey) 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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKey
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFSummaryDeclarationGoodsItemIdentificationByKey)
            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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKey
            Return CType(SerializerXml.Deserialize(s),FCFCDFSummaryDeclarationGoodsItemIdentificationByKey)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFSummaryDeclarationGoodsItemIdentificationByKey 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKey object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFSummaryDeclarationGoodsItemIdentificationByKey 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByKey, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFSummaryDeclarationGoodsItemIdentificationByKey)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKey, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByKey) 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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKey
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFSummaryDeclarationGoodsItemIdentificationByKey
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Public Enum FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyKind
        
        '''<remarks/>
        AWB
        
        '''<remarks/>
        ULD
    End Enum
    
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian
        
        #Region "Private fields"
        Private _identification As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._identification = New FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Identification() As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
            Get
                Return Me._identification
            End Get
            Set
                Me._identification = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian 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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian)
            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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian) 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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian)
            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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian
            Return CType(SerializerXml.Deserialize(s),FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian) 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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodian
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
        
        #Region "Private fields"
        Private _referenceNumber As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set
                Me._referenceNumber = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification 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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification)
            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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification) 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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification)
            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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
            Return CType(SerializerXml.Deserialize(s),FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification) 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 FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration
        
        #Region "Private fields"
        Private _mRN As String
        
        Private _referencedRegistrationNumber As String
        
        Private _referencedSequenceNumber As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property MRN() As String
            Get
                Return Me._mRN
            End Get
            Set
                Me._mRN = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property ReferencedRegistrationNumber() As String
            Get
                Return Me._referencedRegistrationNumber
            End Get
            Set
                Me._referencedRegistrationNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer", Order:=2)>  _
        Public Property ReferencedSequenceNumber() As String
            Get
                Return Me._referencedSequenceNumber
            End Get
            Set
                Me._referencedSequenceNumber = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration 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 FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration)
            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 FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration) 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 FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration)
            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 FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration
            Return CType(SerializerXml.Deserialize(s),FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration) 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 FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFSummaryDeclarationGoodsItemIdentificationByRegistration
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFCustomsWarehouse
        
        #Region "Private fields"
        Private _lRN As String
        
        Private _sequenceNumber As FCFCDFCustomsWarehouseSequenceNumber
        
        Private _goodsItemQuantity As String
        
        Private _customsAuthorisation As FCFCDFCustomsWarehouseCustomsAuthorisation
        
        Private _goodsItem As List(Of FCFCDFCustomsWarehouseGoodsItem)
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._goodsItem = New List(Of FCFCDFCustomsWarehouseGoodsItem)()
            Me._customsAuthorisation = New FCFCDFCustomsWarehouseCustomsAuthorisation()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property LRN() As String
            Get
                Return Me._lRN
            End Get
            Set
                Me._lRN = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=1)>  _
        Public Property SequenceNumber() As FCFCDFCustomsWarehouseSequenceNumber
            Get
                Return Me._sequenceNumber
            End Get
            Set
                Me._sequenceNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer", Order:=2)>  _
        Public Property GoodsItemQuantity() As String
            Get
                Return Me._goodsItemQuantity
            End Get
            Set
                Me._goodsItemQuantity = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=3)>  _
        Public Property CustomsAuthorisation() As FCFCDFCustomsWarehouseCustomsAuthorisation
            Get
                Return Me._customsAuthorisation
            End Get
            Set
                Me._customsAuthorisation = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute("GoodsItem", Order:=4)>  _
        Public Property GoodsItem() As List(Of FCFCDFCustomsWarehouseGoodsItem)
            Get
                Return Me._goodsItem
            End Get
            Set
                Me._goodsItem = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFCustomsWarehouse))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFCustomsWarehouse object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFCustomsWarehouse object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFCustomsWarehouse 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 FCFCDFCustomsWarehouse, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFCustomsWarehouse)
            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 FCFCDFCustomsWarehouse) 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 FCFCDFCustomsWarehouse
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFCustomsWarehouse)
            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 FCFCDFCustomsWarehouse
            Return CType(SerializerXml.Deserialize(s),FCFCDFCustomsWarehouse)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFCustomsWarehouse 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFCustomsWarehouse object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFCustomsWarehouse 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFCustomsWarehouse, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFCustomsWarehouse)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFCustomsWarehouse, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFCustomsWarehouse) 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 FCFCDFCustomsWarehouse
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFCustomsWarehouse
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Public Enum FCFCDFCustomsWarehouseSequenceNumber
        
        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1")>  _
        Item1
    End Enum
    
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFCustomsWarehouseCustomsAuthorisation
        
        #Region "Private fields"
        Private _warehouseOwner As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property WarehouseOwner() As String
            Get
                Return Me._warehouseOwner
            End Get
            Set
                Me._warehouseOwner = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFCustomsWarehouseCustomsAuthorisation))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFCustomsWarehouseCustomsAuthorisation object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFCustomsWarehouseCustomsAuthorisation object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFCustomsWarehouseCustomsAuthorisation 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 FCFCDFCustomsWarehouseCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFCustomsWarehouseCustomsAuthorisation)
            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 FCFCDFCustomsWarehouseCustomsAuthorisation) 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 FCFCDFCustomsWarehouseCustomsAuthorisation
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFCustomsWarehouseCustomsAuthorisation)
            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 FCFCDFCustomsWarehouseCustomsAuthorisation
            Return CType(SerializerXml.Deserialize(s),FCFCDFCustomsWarehouseCustomsAuthorisation)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFCustomsWarehouseCustomsAuthorisation 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFCustomsWarehouseCustomsAuthorisation object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFCustomsWarehouseCustomsAuthorisation 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFCustomsWarehouseCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFCustomsWarehouseCustomsAuthorisation)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFCustomsWarehouseCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFCustomsWarehouseCustomsAuthorisation) 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 FCFCDFCustomsWarehouseCustomsAuthorisation
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFCustomsWarehouseCustomsAuthorisation
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFCustomsWarehouseGoodsItem
        
        #Region "Private fields"
        Private _sequenceNumber As String
        
        Private _mRN As String
        
        Private _referencedRegistrationNumber As String
        
        Private _referencedSequenceNumber As String
        
        Private _accessViaAtlasFlag As String
        
        Private _commodityCode As String
        
        Private _usualProcessingFlag As String
        
        Private _complement As String
        
        Private _commercialAmount As FCFCDFCustomsWarehouseGoodsItemCommercialAmount
        
        Private _debitAmount As FCFCDFCustomsWarehouseGoodsItemDebitAmount
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._debitAmount = New FCFCDFCustomsWarehouseGoodsItemDebitAmount()
            Me._commercialAmount = New FCFCDFCustomsWarehouseGoodsItemCommercialAmount()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer", Order:=0)>  _
        Public Property SequenceNumber() As String
            Get
                Return Me._sequenceNumber
            End Get
            Set
                Me._sequenceNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property MRN() As String
            Get
                Return Me._mRN
            End Get
            Set
                Me._mRN = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property ReferencedRegistrationNumber() As String
            Get
                Return Me._referencedRegistrationNumber
            End Get
            Set
                Me._referencedRegistrationNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer", Order:=3)>  _
        Public Property ReferencedSequenceNumber() As String
            Get
                Return Me._referencedSequenceNumber
            End Get
            Set
                Me._referencedSequenceNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=4)>  _
        Public Property AccessViaAtlasFlag() As String
            Get
                Return Me._accessViaAtlasFlag
            End Get
            Set
                Me._accessViaAtlasFlag = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=5)>  _
        Public Property CommodityCode() As String
            Get
                Return Me._commodityCode
            End Get
            Set
                Me._commodityCode = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=6)>  _
        Public Property UsualProcessingFlag() As String
            Get
                Return Me._usualProcessingFlag
            End Get
            Set
                Me._usualProcessingFlag = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=7)>  _
        Public Property Complement() As String
            Get
                Return Me._complement
            End Get
            Set
                Me._complement = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=8)>  _
        Public Property CommercialAmount() As FCFCDFCustomsWarehouseGoodsItemCommercialAmount
            Get
                Return Me._commercialAmount
            End Get
            Set
                Me._commercialAmount = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=9)>  _
        Public Property DebitAmount() As FCFCDFCustomsWarehouseGoodsItemDebitAmount
            Get
                Return Me._debitAmount
            End Get
            Set
                Me._debitAmount = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFCustomsWarehouseGoodsItem))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFCustomsWarehouseGoodsItem object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFCustomsWarehouseGoodsItem object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFCustomsWarehouseGoodsItem 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 FCFCDFCustomsWarehouseGoodsItem, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFCustomsWarehouseGoodsItem)
            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 FCFCDFCustomsWarehouseGoodsItem) 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 FCFCDFCustomsWarehouseGoodsItem
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFCustomsWarehouseGoodsItem)
            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 FCFCDFCustomsWarehouseGoodsItem
            Return CType(SerializerXml.Deserialize(s),FCFCDFCustomsWarehouseGoodsItem)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFCustomsWarehouseGoodsItem 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFCustomsWarehouseGoodsItem object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFCustomsWarehouseGoodsItem 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFCustomsWarehouseGoodsItem, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFCustomsWarehouseGoodsItem)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFCustomsWarehouseGoodsItem, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFCustomsWarehouseGoodsItem) 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 FCFCDFCustomsWarehouseGoodsItem
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFCustomsWarehouseGoodsItem
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFCustomsWarehouseGoodsItemCommercialAmount
        
        #Region "Private fields"
        Private _quantity As Decimal
        
        Private _measurementUnit As String
        
        Private _qualifier As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Quantity() As Decimal
            Get
                Return Me._quantity
            End Get
            Set
                Me._quantity = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property MeasurementUnit() As String
            Get
                Return Me._measurementUnit
            End Get
            Set
                Me._measurementUnit = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property Qualifier() As String
            Get
                Return Me._qualifier
            End Get
            Set
                Me._qualifier = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFCustomsWarehouseGoodsItemCommercialAmount))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFCustomsWarehouseGoodsItemCommercialAmount object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFCustomsWarehouseGoodsItemCommercialAmount object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFCustomsWarehouseGoodsItemCommercialAmount 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 FCFCDFCustomsWarehouseGoodsItemCommercialAmount, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFCustomsWarehouseGoodsItemCommercialAmount)
            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 FCFCDFCustomsWarehouseGoodsItemCommercialAmount) 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 FCFCDFCustomsWarehouseGoodsItemCommercialAmount
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFCustomsWarehouseGoodsItemCommercialAmount)
            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 FCFCDFCustomsWarehouseGoodsItemCommercialAmount
            Return CType(SerializerXml.Deserialize(s),FCFCDFCustomsWarehouseGoodsItemCommercialAmount)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFCustomsWarehouseGoodsItemCommercialAmount 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFCustomsWarehouseGoodsItemCommercialAmount object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFCustomsWarehouseGoodsItemCommercialAmount 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFCustomsWarehouseGoodsItemCommercialAmount, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFCustomsWarehouseGoodsItemCommercialAmount)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFCustomsWarehouseGoodsItemCommercialAmount, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFCustomsWarehouseGoodsItemCommercialAmount) 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 FCFCDFCustomsWarehouseGoodsItemCommercialAmount
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFCustomsWarehouseGoodsItemCommercialAmount
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFCustomsWarehouseGoodsItemDebitAmount
        
        #Region "Private fields"
        Private _quantity As Decimal
        
        Private _measurementUnit As String
        
        Private _qualifier As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Quantity() As Decimal
            Get
                Return Me._quantity
            End Get
            Set
                Me._quantity = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property MeasurementUnit() As String
            Get
                Return Me._measurementUnit
            End Get
            Set
                Me._measurementUnit = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property Qualifier() As String
            Get
                Return Me._qualifier
            End Get
            Set
                Me._qualifier = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFCustomsWarehouseGoodsItemDebitAmount))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFCustomsWarehouseGoodsItemDebitAmount object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFCustomsWarehouseGoodsItemDebitAmount object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFCustomsWarehouseGoodsItemDebitAmount 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 FCFCDFCustomsWarehouseGoodsItemDebitAmount, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFCustomsWarehouseGoodsItemDebitAmount)
            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 FCFCDFCustomsWarehouseGoodsItemDebitAmount) 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 FCFCDFCustomsWarehouseGoodsItemDebitAmount
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFCustomsWarehouseGoodsItemDebitAmount)
            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 FCFCDFCustomsWarehouseGoodsItemDebitAmount
            Return CType(SerializerXml.Deserialize(s),FCFCDFCustomsWarehouseGoodsItemDebitAmount)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFCustomsWarehouseGoodsItemDebitAmount 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFCustomsWarehouseGoodsItemDebitAmount object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFCustomsWarehouseGoodsItemDebitAmount 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFCustomsWarehouseGoodsItemDebitAmount, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFCustomsWarehouseGoodsItemDebitAmount)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFCustomsWarehouseGoodsItemDebitAmount, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFCustomsWarehouseGoodsItemDebitAmount) 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 FCFCDFCustomsWarehouseGoodsItemDebitAmount
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFCustomsWarehouseGoodsItemDebitAmount
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFInwardProcessing
        
        #Region "Private fields"
        Private _sequenceNumber As FCFCDFInwardProcessingSequenceNumber
        
        Private _goodsItemQuantity As String
        
        Private _customsAuthorisation As FCFCDFInwardProcessingCustomsAuthorisation
        
        Private _simplifiedGrantAuthorisationFlag As String
        
        Private _monitoringCustomsOffice As FCFCDFInwardProcessingMonitoringCustomsOffice
        
        Private _goodsItem As List(Of FCFCDFInwardProcessingGoodsItem)
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._goodsItem = New List(Of FCFCDFInwardProcessingGoodsItem)()
            Me._monitoringCustomsOffice = New FCFCDFInwardProcessingMonitoringCustomsOffice()
            Me._customsAuthorisation = New FCFCDFInwardProcessingCustomsAuthorisation()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property SequenceNumber() As FCFCDFInwardProcessingSequenceNumber
            Get
                Return Me._sequenceNumber
            End Get
            Set
                Me._sequenceNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer", Order:=1)>  _
        Public Property GoodsItemQuantity() As String
            Get
                Return Me._goodsItemQuantity
            End Get
            Set
                Me._goodsItemQuantity = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=2)>  _
        Public Property CustomsAuthorisation() As FCFCDFInwardProcessingCustomsAuthorisation
            Get
                Return Me._customsAuthorisation
            End Get
            Set
                Me._customsAuthorisation = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=3)>  _
        Public Property SimplifiedGrantAuthorisationFlag() As String
            Get
                Return Me._simplifiedGrantAuthorisationFlag
            End Get
            Set
                Me._simplifiedGrantAuthorisationFlag = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=4)>  _
        Public Property MonitoringCustomsOffice() As FCFCDFInwardProcessingMonitoringCustomsOffice
            Get
                Return Me._monitoringCustomsOffice
            End Get
            Set
                Me._monitoringCustomsOffice = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute("GoodsItem", Order:=5)>  _
        Public Property GoodsItem() As List(Of FCFCDFInwardProcessingGoodsItem)
            Get
                Return Me._goodsItem
            End Get
            Set
                Me._goodsItem = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFInwardProcessing))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFInwardProcessing object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFInwardProcessing object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFInwardProcessing 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 FCFCDFInwardProcessing, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFInwardProcessing)
            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 FCFCDFInwardProcessing) 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 FCFCDFInwardProcessing
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFInwardProcessing)
            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 FCFCDFInwardProcessing
            Return CType(SerializerXml.Deserialize(s),FCFCDFInwardProcessing)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFInwardProcessing 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFInwardProcessing object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFInwardProcessing 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFInwardProcessing, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFInwardProcessing)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFInwardProcessing, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFInwardProcessing) 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 FCFCDFInwardProcessing
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFInwardProcessing
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Public Enum FCFCDFInwardProcessingSequenceNumber
        
        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("1")>  _
        Item1
    End Enum
    
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFInwardProcessingCustomsAuthorisation
        
        #Region "Private fields"
        Private _processingOwner As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property ProcessingOwner() As String
            Get
                Return Me._processingOwner
            End Get
            Set
                Me._processingOwner = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFInwardProcessingCustomsAuthorisation))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFInwardProcessingCustomsAuthorisation object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFInwardProcessingCustomsAuthorisation object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFInwardProcessingCustomsAuthorisation 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 FCFCDFInwardProcessingCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFInwardProcessingCustomsAuthorisation)
            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 FCFCDFInwardProcessingCustomsAuthorisation) 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 FCFCDFInwardProcessingCustomsAuthorisation
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFInwardProcessingCustomsAuthorisation)
            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 FCFCDFInwardProcessingCustomsAuthorisation
            Return CType(SerializerXml.Deserialize(s),FCFCDFInwardProcessingCustomsAuthorisation)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFInwardProcessingCustomsAuthorisation 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFInwardProcessingCustomsAuthorisation object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFInwardProcessingCustomsAuthorisation 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFInwardProcessingCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFInwardProcessingCustomsAuthorisation)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFInwardProcessingCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFInwardProcessingCustomsAuthorisation) 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 FCFCDFInwardProcessingCustomsAuthorisation
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFInwardProcessingCustomsAuthorisation
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFInwardProcessingMonitoringCustomsOffice
        
        #Region "Private fields"
        Private _identification As FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._identification = New FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Identification() As FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification
            Get
                Return Me._identification
            End Get
            Set
                Me._identification = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFInwardProcessingMonitoringCustomsOffice))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFInwardProcessingMonitoringCustomsOffice object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFInwardProcessingMonitoringCustomsOffice object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFInwardProcessingMonitoringCustomsOffice 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 FCFCDFInwardProcessingMonitoringCustomsOffice, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFInwardProcessingMonitoringCustomsOffice)
            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 FCFCDFInwardProcessingMonitoringCustomsOffice) 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 FCFCDFInwardProcessingMonitoringCustomsOffice
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFInwardProcessingMonitoringCustomsOffice)
            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 FCFCDFInwardProcessingMonitoringCustomsOffice
            Return CType(SerializerXml.Deserialize(s),FCFCDFInwardProcessingMonitoringCustomsOffice)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFInwardProcessingMonitoringCustomsOffice 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFInwardProcessingMonitoringCustomsOffice object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFInwardProcessingMonitoringCustomsOffice 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFInwardProcessingMonitoringCustomsOffice, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFInwardProcessingMonitoringCustomsOffice)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFInwardProcessingMonitoringCustomsOffice, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFInwardProcessingMonitoringCustomsOffice) 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 FCFCDFInwardProcessingMonitoringCustomsOffice
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFInwardProcessingMonitoringCustomsOffice
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification
        
        #Region "Private fields"
        Private _referenceNumber As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set
                Me._referenceNumber = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification 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 FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification)
            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 FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification) 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 FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification)
            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 FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification
            Return CType(SerializerXml.Deserialize(s),FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification) 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 FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFInwardProcessingMonitoringCustomsOfficeIdentification
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFInwardProcessingGoodsItem
        
        #Region "Private fields"
        Private _sequenceNumber As String
        
        Private _mRN As String
        
        Private _referencedRegistrationNumber As String
        
        Private _referencedSequenceNumber As String
        
        Private _accessViaAtlasFlag As String
        
        Private _goodsRelatedInformation As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer", Order:=0)>  _
        Public Property SequenceNumber() As String
            Get
                Return Me._sequenceNumber
            End Get
            Set
                Me._sequenceNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property MRN() As String
            Get
                Return Me._mRN
            End Get
            Set
                Me._mRN = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property ReferencedRegistrationNumber() As String
            Get
                Return Me._referencedRegistrationNumber
            End Get
            Set
                Me._referencedRegistrationNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer", Order:=3)>  _
        Public Property ReferencedSequenceNumber() As String
            Get
                Return Me._referencedSequenceNumber
            End Get
            Set
                Me._referencedSequenceNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=4)>  _
        Public Property AccessViaAtlasFlag() As String
            Get
                Return Me._accessViaAtlasFlag
            End Get
            Set
                Me._accessViaAtlasFlag = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=5)>  _
        Public Property GoodsRelatedInformation() As String
            Get
                Return Me._goodsRelatedInformation
            End Get
            Set
                Me._goodsRelatedInformation = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFInwardProcessingGoodsItem))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFInwardProcessingGoodsItem object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFInwardProcessingGoodsItem object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFInwardProcessingGoodsItem 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 FCFCDFInwardProcessingGoodsItem, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFInwardProcessingGoodsItem)
            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 FCFCDFInwardProcessingGoodsItem) 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 FCFCDFInwardProcessingGoodsItem
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFInwardProcessingGoodsItem)
            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 FCFCDFInwardProcessingGoodsItem
            Return CType(SerializerXml.Deserialize(s),FCFCDFInwardProcessingGoodsItem)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFInwardProcessingGoodsItem 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFInwardProcessingGoodsItem object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFInwardProcessingGoodsItem 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFInwardProcessingGoodsItem, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFInwardProcessingGoodsItem)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFInwardProcessingGoodsItem, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFInwardProcessingGoodsItem) 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 FCFCDFInwardProcessingGoodsItem
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFInwardProcessingGoodsItem
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBody
        
        #Region "Private fields"
        Private _customsValueFlag As String
        
        Private _consignor As FCFCDFBodyConsignor
        
        Private _consignee As FCFCDFBodyConsignee
        
        Private _additionalDutyReferences As List(Of FCFCDFBodyAdditionalDutyReferences)
        
        Private _containers As FCFCDFBodyContainers
        
        Private _deliveryTerms As FCFCDFBodyDeliveryTerms
        
        Private _paymentTransaction As FCFCDFBodyPaymentTransaction
        
        Private _foreignTradeStatistics As FCFCDFBodyForeignTradeStatistics
        
        Private _customsValue As FCFCDFBodyCustomsValue
        
        Private _document As List(Of FCFCDFBodyDocument)
        
        Private _goodsItem As List(Of FCFCDFBodyGoodsItem)
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._goodsItem = New List(Of FCFCDFBodyGoodsItem)()
            Me._document = New List(Of FCFCDFBodyDocument)()
            Me._customsValue = New FCFCDFBodyCustomsValue()
            Me._foreignTradeStatistics = New FCFCDFBodyForeignTradeStatistics()
            Me._paymentTransaction = New FCFCDFBodyPaymentTransaction()
            Me._deliveryTerms = New FCFCDFBodyDeliveryTerms()
            Me._containers = New FCFCDFBodyContainers()
            Me._additionalDutyReferences = New List(Of FCFCDFBodyAdditionalDutyReferences)()
            Me._consignee = New FCFCDFBodyConsignee()
            Me._consignor = New FCFCDFBodyConsignor()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property CustomsValueFlag() As String
            Get
                Return Me._customsValueFlag
            End Get
            Set
                Me._customsValueFlag = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=1)>  _
        Public Property Consignor() As FCFCDFBodyConsignor
            Get
                Return Me._consignor
            End Get
            Set
                Me._consignor = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=2)>  _
        Public Property Consignee() As FCFCDFBodyConsignee
            Get
                Return Me._consignee
            End Get
            Set
                Me._consignee = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute("AdditionalDutyReferences", Order:=3)>  _
        Public Property AdditionalDutyReferences() As List(Of FCFCDFBodyAdditionalDutyReferences)
            Get
                Return Me._additionalDutyReferences
            End Get
            Set
                Me._additionalDutyReferences = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=4)>  _
        Public Property Containers() As FCFCDFBodyContainers
            Get
                Return Me._containers
            End Get
            Set
                Me._containers = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=5)>  _
        Public Property DeliveryTerms() As FCFCDFBodyDeliveryTerms
            Get
                Return Me._deliveryTerms
            End Get
            Set
                Me._deliveryTerms = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=6)>  _
        Public Property PaymentTransaction() As FCFCDFBodyPaymentTransaction
            Get
                Return Me._paymentTransaction
            End Get
            Set
                Me._paymentTransaction = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=7)>  _
        Public Property ForeignTradeStatistics() As FCFCDFBodyForeignTradeStatistics
            Get
                Return Me._foreignTradeStatistics
            End Get
            Set
                Me._foreignTradeStatistics = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=8)>  _
        Public Property CustomsValue() As FCFCDFBodyCustomsValue
            Get
                Return Me._customsValue
            End Get
            Set
                Me._customsValue = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute("Document", Order:=9)>  _
        Public Property Document() As List(Of FCFCDFBodyDocument)
            Get
                Return Me._document
            End Get
            Set
                Me._document = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute("GoodsItem", Order:=10)>  _
        Public Property GoodsItem() As List(Of FCFCDFBodyGoodsItem)
            Get
                Return Me._goodsItem
            End Get
            Set
                Me._goodsItem = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBody))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBody object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBody object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBody 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 FCFCDFBody, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBody)
            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 FCFCDFBody) 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 FCFCDFBody
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBody)
            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 FCFCDFBody
            Return CType(SerializerXml.Deserialize(s),FCFCDFBody)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBody 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBody object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBody 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBody, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBody)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBody, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBody) 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 FCFCDFBody
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBody
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyConsignor
        
        #Region "Private fields"
        Private _identification As FCFCDFBodyConsignorIdentification
        
        Private _name As String
        
        Private _address As FCFCDFBodyConsignorAddress
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._address = New FCFCDFBodyConsignorAddress()
            Me._identification = New FCFCDFBodyConsignorIdentification()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Identification() As FCFCDFBodyConsignorIdentification
            Get
                Return Me._identification
            End Get
            Set
                Me._identification = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set
                Me._name = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=2)>  _
        Public Property Address() As FCFCDFBodyConsignorAddress
            Get
                Return Me._address
            End Get
            Set
                Me._address = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyConsignor))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyConsignor object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyConsignor object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyConsignor 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 FCFCDFBodyConsignor, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyConsignor)
            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 FCFCDFBodyConsignor) 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 FCFCDFBodyConsignor
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyConsignor)
            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 FCFCDFBodyConsignor
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyConsignor)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyConsignor 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyConsignor object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyConsignor 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyConsignor, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyConsignor)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyConsignor, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyConsignor) 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 FCFCDFBodyConsignor
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyConsignor
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyConsignorIdentification
        
        #Region "Private fields"
        Private _referenceNumber As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set
                Me._referenceNumber = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyConsignorIdentification))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyConsignorIdentification object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyConsignorIdentification object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyConsignorIdentification 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 FCFCDFBodyConsignorIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyConsignorIdentification)
            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 FCFCDFBodyConsignorIdentification) 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 FCFCDFBodyConsignorIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyConsignorIdentification)
            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 FCFCDFBodyConsignorIdentification
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyConsignorIdentification)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyConsignorIdentification 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyConsignorIdentification object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyConsignorIdentification 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyConsignorIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyConsignorIdentification)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyConsignorIdentification, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyConsignorIdentification) 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 FCFCDFBodyConsignorIdentification
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyConsignorIdentification
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyConsignorAddress
        
        #Region "Private fields"
        Private _line As String
        
        Private _country As String
        
        Private _postcode As String
        
        Private _city As String
        
        Private _district As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Line() As String
            Get
                Return Me._line
            End Get
            Set
                Me._line = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Country() As String
            Get
                Return Me._country
            End Get
            Set
                Me._country = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property Postcode() As String
            Get
                Return Me._postcode
            End Get
            Set
                Me._postcode = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=3)>  _
        Public Property City() As String
            Get
                Return Me._city
            End Get
            Set
                Me._city = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=4)>  _
        Public Property District() As String
            Get
                Return Me._district
            End Get
            Set
                Me._district = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyConsignorAddress))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyConsignorAddress object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyConsignorAddress object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyConsignorAddress 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 FCFCDFBodyConsignorAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyConsignorAddress)
            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 FCFCDFBodyConsignorAddress) 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 FCFCDFBodyConsignorAddress
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyConsignorAddress)
            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 FCFCDFBodyConsignorAddress
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyConsignorAddress)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyConsignorAddress 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyConsignorAddress object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyConsignorAddress 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyConsignorAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyConsignorAddress)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyConsignorAddress, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyConsignorAddress) 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 FCFCDFBodyConsignorAddress
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyConsignorAddress
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyConsignee
        
        #Region "Private fields"
        Private _identification As FCFCDFBodyConsigneeIdentification
        
        Private _name As String
        
        Private _address As FCFCDFBodyConsigneeAddress
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._address = New FCFCDFBodyConsigneeAddress()
            Me._identification = New FCFCDFBodyConsigneeIdentification()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Identification() As FCFCDFBodyConsigneeIdentification
            Get
                Return Me._identification
            End Get
            Set
                Me._identification = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set
                Me._name = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=2)>  _
        Public Property Address() As FCFCDFBodyConsigneeAddress
            Get
                Return Me._address
            End Get
            Set
                Me._address = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyConsignee))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyConsignee object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyConsignee object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyConsignee 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 FCFCDFBodyConsignee, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyConsignee)
            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 FCFCDFBodyConsignee) 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 FCFCDFBodyConsignee
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyConsignee)
            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 FCFCDFBodyConsignee
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyConsignee)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyConsignee 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyConsignee object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyConsignee 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyConsignee, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyConsignee)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyConsignee, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyConsignee) 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 FCFCDFBodyConsignee
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyConsignee
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyConsigneeIdentification
        
        #Region "Private fields"
        Private _referenceNumber As String
        
        Private _subsidiaryNumber As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set
                Me._referenceNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property SubsidiaryNumber() As String
            Get
                Return Me._subsidiaryNumber
            End Get
            Set
                Me._subsidiaryNumber = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyConsigneeIdentification))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyConsigneeIdentification object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyConsigneeIdentification object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyConsigneeIdentification 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 FCFCDFBodyConsigneeIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyConsigneeIdentification)
            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 FCFCDFBodyConsigneeIdentification) 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 FCFCDFBodyConsigneeIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyConsigneeIdentification)
            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 FCFCDFBodyConsigneeIdentification
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyConsigneeIdentification)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyConsigneeIdentification 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyConsigneeIdentification object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyConsigneeIdentification 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyConsigneeIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyConsigneeIdentification)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyConsigneeIdentification, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyConsigneeIdentification) 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 FCFCDFBodyConsigneeIdentification
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyConsigneeIdentification
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyConsigneeAddress
        
        #Region "Private fields"
        Private _line As String
        
        Private _country As String
        
        Private _postcode As String
        
        Private _city As String
        
        Private _district As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Line() As String
            Get
                Return Me._line
            End Get
            Set
                Me._line = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Country() As String
            Get
                Return Me._country
            End Get
            Set
                Me._country = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property Postcode() As String
            Get
                Return Me._postcode
            End Get
            Set
                Me._postcode = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=3)>  _
        Public Property City() As String
            Get
                Return Me._city
            End Get
            Set
                Me._city = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=4)>  _
        Public Property District() As String
            Get
                Return Me._district
            End Get
            Set
                Me._district = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyConsigneeAddress))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyConsigneeAddress object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyConsigneeAddress object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyConsigneeAddress 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 FCFCDFBodyConsigneeAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyConsigneeAddress)
            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 FCFCDFBodyConsigneeAddress) 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 FCFCDFBodyConsigneeAddress
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyConsigneeAddress)
            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 FCFCDFBodyConsigneeAddress
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyConsigneeAddress)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyConsigneeAddress 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyConsigneeAddress object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyConsigneeAddress 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyConsigneeAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyConsigneeAddress)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyConsigneeAddress, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyConsigneeAddress) 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 FCFCDFBodyConsigneeAddress
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyConsigneeAddress
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyAdditionalDutyReferences
        
        #Region "Private fields"
        Private _referenceNumber As String
        
        Private _dutyInterestedParty As FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._dutyInterestedParty = New FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set
                Me._referenceNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=1)>  _
        Public Property DutyInterestedParty() As FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty
            Get
                Return Me._dutyInterestedParty
            End Get
            Set
                Me._dutyInterestedParty = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyAdditionalDutyReferences))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyAdditionalDutyReferences object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyAdditionalDutyReferences object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyAdditionalDutyReferences 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 FCFCDFBodyAdditionalDutyReferences, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyAdditionalDutyReferences)
            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 FCFCDFBodyAdditionalDutyReferences) 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 FCFCDFBodyAdditionalDutyReferences
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyAdditionalDutyReferences)
            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 FCFCDFBodyAdditionalDutyReferences
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyAdditionalDutyReferences)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyAdditionalDutyReferences 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyAdditionalDutyReferences object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyAdditionalDutyReferences 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyAdditionalDutyReferences, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyAdditionalDutyReferences)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyAdditionalDutyReferences, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyAdditionalDutyReferences) 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 FCFCDFBodyAdditionalDutyReferences
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyAdditionalDutyReferences
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty
        
        #Region "Private fields"
        Private _identification As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification
        
        Private _name As String
        
        Private _address As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._address = New FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress()
            Me._identification = New FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Identification() As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification
            Get
                Return Me._identification
            End Get
            Set
                Me._identification = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set
                Me._name = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=2)>  _
        Public Property Address() As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress
            Get
                Return Me._address
            End Get
            Set
                Me._address = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty 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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty)
            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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty) 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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty)
            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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty) 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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyAdditionalDutyReferencesDutyInterestedParty
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification
        
        #Region "Private fields"
        Private _referenceNumber As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set
                Me._referenceNumber = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification 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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification)
            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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification) 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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification)
            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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification) 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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyIdentification
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress
        
        #Region "Private fields"
        Private _line As String
        
        Private _country As String
        
        Private _postcode As String
        
        Private _city As String
        
        Private _district As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Line() As String
            Get
                Return Me._line
            End Get
            Set
                Me._line = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Country() As String
            Get
                Return Me._country
            End Get
            Set
                Me._country = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property Postcode() As String
            Get
                Return Me._postcode
            End Get
            Set
                Me._postcode = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=3)>  _
        Public Property City() As String
            Get
                Return Me._city
            End Get
            Set
                Me._city = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=4)>  _
        Public Property District() As String
            Get
                Return Me._district
            End Get
            Set
                Me._district = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress 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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress)
            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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress) 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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress)
            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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress) 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 FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyAdditionalDutyReferencesDutyInterestedPartyAddress
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyContainers
        
        #Region "Private fields"
        Private _containerFlag As String
        
        Private _container As List(Of FCFCDFBodyContainersContainer)
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._container = New List(Of FCFCDFBodyContainersContainer)()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property ContainerFlag() As String
            Get
                Return Me._containerFlag
            End Get
            Set
                Me._containerFlag = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute("Container", Order:=1)>  _
        Public Property Container() As List(Of FCFCDFBodyContainersContainer)
            Get
                Return Me._container
            End Get
            Set
                Me._container = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyContainers))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyContainers object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyContainers object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyContainers 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 FCFCDFBodyContainers, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyContainers)
            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 FCFCDFBodyContainers) 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 FCFCDFBodyContainers
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyContainers)
            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 FCFCDFBodyContainers
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyContainers)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyContainers 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyContainers object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyContainers 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyContainers, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyContainers)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyContainers, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyContainers) 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 FCFCDFBodyContainers
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyContainers
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyContainersContainer
        
        #Region "Private fields"
        Private _identificationNumber As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property IdentificationNumber() As String
            Get
                Return Me._identificationNumber
            End Get
            Set
                Me._identificationNumber = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyContainersContainer))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyContainersContainer object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyContainersContainer object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyContainersContainer 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 FCFCDFBodyContainersContainer, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyContainersContainer)
            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 FCFCDFBodyContainersContainer) 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 FCFCDFBodyContainersContainer
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyContainersContainer)
            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 FCFCDFBodyContainersContainer
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyContainersContainer)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyContainersContainer 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyContainersContainer object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyContainersContainer 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyContainersContainer, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyContainersContainer)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyContainersContainer, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyContainersContainer) 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 FCFCDFBodyContainersContainer
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyContainersContainer
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyDeliveryTerms
        
        #Region "Private fields"
        Private _code As String
        
        Private _description As String
        
        Private _place As String
        
        Private _key As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Code() As String
            Get
                Return Me._code
            End Get
            Set
                Me._code = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Description() As String
            Get
                Return Me._description
            End Get
            Set
                Me._description = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property Place() As String
            Get
                Return Me._place
            End Get
            Set
                Me._place = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=3)>  _
        Public Property Key() As String
            Get
                Return Me._key
            End Get
            Set
                Me._key = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyDeliveryTerms))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyDeliveryTerms object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyDeliveryTerms object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyDeliveryTerms 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 FCFCDFBodyDeliveryTerms, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyDeliveryTerms)
            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 FCFCDFBodyDeliveryTerms) 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 FCFCDFBodyDeliveryTerms
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyDeliveryTerms)
            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 FCFCDFBodyDeliveryTerms
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyDeliveryTerms)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyDeliveryTerms 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyDeliveryTerms object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyDeliveryTerms 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyDeliveryTerms, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyDeliveryTerms)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyDeliveryTerms, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyDeliveryTerms) 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 FCFCDFBodyDeliveryTerms
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyDeliveryTerms
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyPaymentTransaction
        
        #Region "Private fields"
        Private _amount As Decimal
        
        Private _currencyCode As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Amount() As Decimal
            Get
                Return Me._amount
            End Get
            Set
                Me._amount = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property CurrencyCode() As String
            Get
                Return Me._currencyCode
            End Get
            Set
                Me._currencyCode = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyPaymentTransaction))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyPaymentTransaction object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyPaymentTransaction object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyPaymentTransaction 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 FCFCDFBodyPaymentTransaction, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyPaymentTransaction)
            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 FCFCDFBodyPaymentTransaction) 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 FCFCDFBodyPaymentTransaction
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyPaymentTransaction)
            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 FCFCDFBodyPaymentTransaction
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyPaymentTransaction)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyPaymentTransaction 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyPaymentTransaction object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyPaymentTransaction 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyPaymentTransaction, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyPaymentTransaction)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyPaymentTransaction, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyPaymentTransaction) 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 FCFCDFBodyPaymentTransaction
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyPaymentTransaction
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyForeignTradeStatistics
        
        #Region "Private fields"
        Private _goodsStatus As String
        
        Private _transactionType As String
        
        Private _destinationCountry As String
        
        Private _destinationFederalState As String
        
        Private _inlandTransportMode As String
        
        Private _totalGrossMassMeasure As Decimal
        
        Private _entryCustomsOffice As FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._entryCustomsOffice = New FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property GoodsStatus() As String
            Get
                Return Me._goodsStatus
            End Get
            Set
                Me._goodsStatus = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property TransactionType() As String
            Get
                Return Me._transactionType
            End Get
            Set
                Me._transactionType = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property DestinationCountry() As String
            Get
                Return Me._destinationCountry
            End Get
            Set
                Me._destinationCountry = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=3)>  _
        Public Property DestinationFederalState() As String
            Get
                Return Me._destinationFederalState
            End Get
            Set
                Me._destinationFederalState = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=4)>  _
        Public Property InlandTransportMode() As String
            Get
                Return Me._inlandTransportMode
            End Get
            Set
                Me._inlandTransportMode = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=5)>  _
        Public Property TotalGrossMassMeasure() As Decimal
            Get
                Return Me._totalGrossMassMeasure
            End Get
            Set
                Me._totalGrossMassMeasure = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=6)>  _
        Public Property EntryCustomsOffice() As FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice
            Get
                Return Me._entryCustomsOffice
            End Get
            Set
                Me._entryCustomsOffice = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyForeignTradeStatistics))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyForeignTradeStatistics object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyForeignTradeStatistics object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyForeignTradeStatistics 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 FCFCDFBodyForeignTradeStatistics, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyForeignTradeStatistics)
            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 FCFCDFBodyForeignTradeStatistics) 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 FCFCDFBodyForeignTradeStatistics
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyForeignTradeStatistics)
            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 FCFCDFBodyForeignTradeStatistics
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyForeignTradeStatistics)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyForeignTradeStatistics 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyForeignTradeStatistics object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyForeignTradeStatistics 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyForeignTradeStatistics, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyForeignTradeStatistics)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyForeignTradeStatistics, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyForeignTradeStatistics) 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 FCFCDFBodyForeignTradeStatistics
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyForeignTradeStatistics
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice
        
        #Region "Private fields"
        Private _referenceNumber As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set
                Me._referenceNumber = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice 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 FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice)
            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 FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice) 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 FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice)
            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 FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice) 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 FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyForeignTradeStatisticsEntryCustomsOffice
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyCustomsValue
        
        #Region "Private fields"
        Private _formerDecisions As String
        
        Private _vendor As FCFCDFBodyCustomsValueVendor
        
        Private _vendee As FCFCDFBodyCustomsValueVendee
        
        Private _affiliation As FCFCDFBodyCustomsValueAffiliation
        
        Private _restrictionOrCondition As FCFCDFBodyCustomsValueRestrictionOrCondition
        
        Private _licenseFee As FCFCDFBodyCustomsValueLicenseFee
        
        Private _resale As FCFCDFBodyCustomsValueResale
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._resale = New FCFCDFBodyCustomsValueResale()
            Me._licenseFee = New FCFCDFBodyCustomsValueLicenseFee()
            Me._restrictionOrCondition = New FCFCDFBodyCustomsValueRestrictionOrCondition()
            Me._affiliation = New FCFCDFBodyCustomsValueAffiliation()
            Me._vendee = New FCFCDFBodyCustomsValueVendee()
            Me._vendor = New FCFCDFBodyCustomsValueVendor()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property FormerDecisions() As String
            Get
                Return Me._formerDecisions
            End Get
            Set
                Me._formerDecisions = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=1)>  _
        Public Property Vendor() As FCFCDFBodyCustomsValueVendor
            Get
                Return Me._vendor
            End Get
            Set
                Me._vendor = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=2)>  _
        Public Property Vendee() As FCFCDFBodyCustomsValueVendee
            Get
                Return Me._vendee
            End Get
            Set
                Me._vendee = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=3)>  _
        Public Property Affiliation() As FCFCDFBodyCustomsValueAffiliation
            Get
                Return Me._affiliation
            End Get
            Set
                Me._affiliation = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=4)>  _
        Public Property RestrictionOrCondition() As FCFCDFBodyCustomsValueRestrictionOrCondition
            Get
                Return Me._restrictionOrCondition
            End Get
            Set
                Me._restrictionOrCondition = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=5)>  _
        Public Property LicenseFee() As FCFCDFBodyCustomsValueLicenseFee
            Get
                Return Me._licenseFee
            End Get
            Set
                Me._licenseFee = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=6)>  _
        Public Property Resale() As FCFCDFBodyCustomsValueResale
            Get
                Return Me._resale
            End Get
            Set
                Me._resale = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyCustomsValue))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyCustomsValue object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyCustomsValue object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyCustomsValue 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 FCFCDFBodyCustomsValue, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyCustomsValue)
            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 FCFCDFBodyCustomsValue) 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 FCFCDFBodyCustomsValue
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyCustomsValue)
            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 FCFCDFBodyCustomsValue
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyCustomsValue)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyCustomsValue 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyCustomsValue object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyCustomsValue 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyCustomsValue, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyCustomsValue)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyCustomsValue, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValue) 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 FCFCDFBodyCustomsValue
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyCustomsValue
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyCustomsValueVendor
        
        #Region "Private fields"
        Private _identification As FCFCDFBodyCustomsValueVendorIdentification
        
        Private _name As String
        
        Private _address As FCFCDFBodyCustomsValueVendorAddress
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._address = New FCFCDFBodyCustomsValueVendorAddress()
            Me._identification = New FCFCDFBodyCustomsValueVendorIdentification()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Identification() As FCFCDFBodyCustomsValueVendorIdentification
            Get
                Return Me._identification
            End Get
            Set
                Me._identification = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set
                Me._name = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=2)>  _
        Public Property Address() As FCFCDFBodyCustomsValueVendorAddress
            Get
                Return Me._address
            End Get
            Set
                Me._address = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyCustomsValueVendor))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyCustomsValueVendor object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyCustomsValueVendor object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyCustomsValueVendor 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 FCFCDFBodyCustomsValueVendor, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyCustomsValueVendor)
            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 FCFCDFBodyCustomsValueVendor) 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 FCFCDFBodyCustomsValueVendor
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyCustomsValueVendor)
            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 FCFCDFBodyCustomsValueVendor
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyCustomsValueVendor)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyCustomsValueVendor 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyCustomsValueVendor object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyCustomsValueVendor 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyCustomsValueVendor, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyCustomsValueVendor)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyCustomsValueVendor, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueVendor) 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 FCFCDFBodyCustomsValueVendor
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyCustomsValueVendor
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyCustomsValueVendorIdentification
        
        #Region "Private fields"
        Private _referenceNumber As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set
                Me._referenceNumber = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyCustomsValueVendorIdentification))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyCustomsValueVendorIdentification object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyCustomsValueVendorIdentification object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyCustomsValueVendorIdentification 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 FCFCDFBodyCustomsValueVendorIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyCustomsValueVendorIdentification)
            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 FCFCDFBodyCustomsValueVendorIdentification) 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 FCFCDFBodyCustomsValueVendorIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyCustomsValueVendorIdentification)
            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 FCFCDFBodyCustomsValueVendorIdentification
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyCustomsValueVendorIdentification)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyCustomsValueVendorIdentification 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyCustomsValueVendorIdentification object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyCustomsValueVendorIdentification 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyCustomsValueVendorIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyCustomsValueVendorIdentification)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyCustomsValueVendorIdentification, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueVendorIdentification) 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 FCFCDFBodyCustomsValueVendorIdentification
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyCustomsValueVendorIdentification
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyCustomsValueVendorAddress
        
        #Region "Private fields"
        Private _line As String
        
        Private _country As String
        
        Private _postcode As String
        
        Private _city As String
        
        Private _district As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Line() As String
            Get
                Return Me._line
            End Get
            Set
                Me._line = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Country() As String
            Get
                Return Me._country
            End Get
            Set
                Me._country = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property Postcode() As String
            Get
                Return Me._postcode
            End Get
            Set
                Me._postcode = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=3)>  _
        Public Property City() As String
            Get
                Return Me._city
            End Get
            Set
                Me._city = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=4)>  _
        Public Property District() As String
            Get
                Return Me._district
            End Get
            Set
                Me._district = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyCustomsValueVendorAddress))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyCustomsValueVendorAddress object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyCustomsValueVendorAddress object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyCustomsValueVendorAddress 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 FCFCDFBodyCustomsValueVendorAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyCustomsValueVendorAddress)
            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 FCFCDFBodyCustomsValueVendorAddress) 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 FCFCDFBodyCustomsValueVendorAddress
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyCustomsValueVendorAddress)
            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 FCFCDFBodyCustomsValueVendorAddress
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyCustomsValueVendorAddress)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyCustomsValueVendorAddress 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyCustomsValueVendorAddress object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyCustomsValueVendorAddress 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyCustomsValueVendorAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyCustomsValueVendorAddress)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyCustomsValueVendorAddress, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueVendorAddress) 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 FCFCDFBodyCustomsValueVendorAddress
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyCustomsValueVendorAddress
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyCustomsValueVendee
        
        #Region "Private fields"
        Private _identification As FCFCDFBodyCustomsValueVendeeIdentification
        
        Private _name As String
        
        Private _address As FCFCDFBodyCustomsValueVendeeAddress
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._address = New FCFCDFBodyCustomsValueVendeeAddress()
            Me._identification = New FCFCDFBodyCustomsValueVendeeIdentification()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Identification() As FCFCDFBodyCustomsValueVendeeIdentification
            Get
                Return Me._identification
            End Get
            Set
                Me._identification = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set
                Me._name = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=2)>  _
        Public Property Address() As FCFCDFBodyCustomsValueVendeeAddress
            Get
                Return Me._address
            End Get
            Set
                Me._address = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyCustomsValueVendee))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyCustomsValueVendee object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyCustomsValueVendee object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyCustomsValueVendee 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 FCFCDFBodyCustomsValueVendee, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyCustomsValueVendee)
            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 FCFCDFBodyCustomsValueVendee) 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 FCFCDFBodyCustomsValueVendee
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyCustomsValueVendee)
            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 FCFCDFBodyCustomsValueVendee
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyCustomsValueVendee)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyCustomsValueVendee 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyCustomsValueVendee object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyCustomsValueVendee 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyCustomsValueVendee, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyCustomsValueVendee)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyCustomsValueVendee, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueVendee) 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 FCFCDFBodyCustomsValueVendee
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyCustomsValueVendee
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyCustomsValueVendeeIdentification
        
        #Region "Private fields"
        Private _referenceNumber As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set
                Me._referenceNumber = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyCustomsValueVendeeIdentification))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyCustomsValueVendeeIdentification object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyCustomsValueVendeeIdentification object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyCustomsValueVendeeIdentification 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 FCFCDFBodyCustomsValueVendeeIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyCustomsValueVendeeIdentification)
            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 FCFCDFBodyCustomsValueVendeeIdentification) 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 FCFCDFBodyCustomsValueVendeeIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyCustomsValueVendeeIdentification)
            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 FCFCDFBodyCustomsValueVendeeIdentification
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyCustomsValueVendeeIdentification)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyCustomsValueVendeeIdentification 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyCustomsValueVendeeIdentification object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyCustomsValueVendeeIdentification 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyCustomsValueVendeeIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyCustomsValueVendeeIdentification)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyCustomsValueVendeeIdentification, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueVendeeIdentification) 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 FCFCDFBodyCustomsValueVendeeIdentification
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyCustomsValueVendeeIdentification
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyCustomsValueVendeeAddress
        
        #Region "Private fields"
        Private _line As String
        
        Private _country As String
        
        Private _postcode As String
        
        Private _city As String
        
        Private _district As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Line() As String
            Get
                Return Me._line
            End Get
            Set
                Me._line = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Country() As String
            Get
                Return Me._country
            End Get
            Set
                Me._country = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property Postcode() As String
            Get
                Return Me._postcode
            End Get
            Set
                Me._postcode = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=3)>  _
        Public Property City() As String
            Get
                Return Me._city
            End Get
            Set
                Me._city = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=4)>  _
        Public Property District() As String
            Get
                Return Me._district
            End Get
            Set
                Me._district = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyCustomsValueVendeeAddress))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyCustomsValueVendeeAddress object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyCustomsValueVendeeAddress object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyCustomsValueVendeeAddress 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 FCFCDFBodyCustomsValueVendeeAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyCustomsValueVendeeAddress)
            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 FCFCDFBodyCustomsValueVendeeAddress) 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 FCFCDFBodyCustomsValueVendeeAddress
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyCustomsValueVendeeAddress)
            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 FCFCDFBodyCustomsValueVendeeAddress
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyCustomsValueVendeeAddress)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyCustomsValueVendeeAddress 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyCustomsValueVendeeAddress object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyCustomsValueVendeeAddress 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyCustomsValueVendeeAddress, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyCustomsValueVendeeAddress)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyCustomsValueVendeeAddress, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueVendeeAddress) 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 FCFCDFBodyCustomsValueVendeeAddress
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyCustomsValueVendeeAddress
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyCustomsValueAffiliation
        
        #Region "Private fields"
        Private _type As String
        
        Private _description As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Type() As String
            Get
                Return Me._type
            End Get
            Set
                Me._type = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Description() As String
            Get
                Return Me._description
            End Get
            Set
                Me._description = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyCustomsValueAffiliation))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyCustomsValueAffiliation object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyCustomsValueAffiliation object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyCustomsValueAffiliation 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 FCFCDFBodyCustomsValueAffiliation, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyCustomsValueAffiliation)
            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 FCFCDFBodyCustomsValueAffiliation) 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 FCFCDFBodyCustomsValueAffiliation
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyCustomsValueAffiliation)
            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 FCFCDFBodyCustomsValueAffiliation
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyCustomsValueAffiliation)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyCustomsValueAffiliation 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyCustomsValueAffiliation object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyCustomsValueAffiliation 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyCustomsValueAffiliation, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyCustomsValueAffiliation)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyCustomsValueAffiliation, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueAffiliation) 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 FCFCDFBodyCustomsValueAffiliation
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyCustomsValueAffiliation
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyCustomsValueRestrictionOrCondition
        
        #Region "Private fields"
        Private _restrictionFlag As String
        
        Private _conditionFlag As String
        
        Private _description As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property RestrictionFlag() As String
            Get
                Return Me._restrictionFlag
            End Get
            Set
                Me._restrictionFlag = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property ConditionFlag() As String
            Get
                Return Me._conditionFlag
            End Get
            Set
                Me._conditionFlag = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property Description() As String
            Get
                Return Me._description
            End Get
            Set
                Me._description = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyCustomsValueRestrictionOrCondition))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyCustomsValueRestrictionOrCondition object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyCustomsValueRestrictionOrCondition object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyCustomsValueRestrictionOrCondition 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 FCFCDFBodyCustomsValueRestrictionOrCondition, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyCustomsValueRestrictionOrCondition)
            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 FCFCDFBodyCustomsValueRestrictionOrCondition) 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 FCFCDFBodyCustomsValueRestrictionOrCondition
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyCustomsValueRestrictionOrCondition)
            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 FCFCDFBodyCustomsValueRestrictionOrCondition
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyCustomsValueRestrictionOrCondition)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyCustomsValueRestrictionOrCondition 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyCustomsValueRestrictionOrCondition object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyCustomsValueRestrictionOrCondition 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyCustomsValueRestrictionOrCondition, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyCustomsValueRestrictionOrCondition)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyCustomsValueRestrictionOrCondition, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueRestrictionOrCondition) 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 FCFCDFBodyCustomsValueRestrictionOrCondition
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyCustomsValueRestrictionOrCondition
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyCustomsValueLicenseFee
        
        #Region "Private fields"
        Private _licenseFeeFlag As String
        
        Private _description As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property LicenseFeeFlag() As String
            Get
                Return Me._licenseFeeFlag
            End Get
            Set
                Me._licenseFeeFlag = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Description() As String
            Get
                Return Me._description
            End Get
            Set
                Me._description = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyCustomsValueLicenseFee))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyCustomsValueLicenseFee object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyCustomsValueLicenseFee object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyCustomsValueLicenseFee 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 FCFCDFBodyCustomsValueLicenseFee, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyCustomsValueLicenseFee)
            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 FCFCDFBodyCustomsValueLicenseFee) 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 FCFCDFBodyCustomsValueLicenseFee
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyCustomsValueLicenseFee)
            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 FCFCDFBodyCustomsValueLicenseFee
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyCustomsValueLicenseFee)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyCustomsValueLicenseFee 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyCustomsValueLicenseFee object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyCustomsValueLicenseFee 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyCustomsValueLicenseFee, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyCustomsValueLicenseFee)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyCustomsValueLicenseFee, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueLicenseFee) 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 FCFCDFBodyCustomsValueLicenseFee
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyCustomsValueLicenseFee
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyCustomsValueResale
        
        #Region "Private fields"
        Private _resaleFlag As String
        
        Private _description As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property ResaleFlag() As String
            Get
                Return Me._resaleFlag
            End Get
            Set
                Me._resaleFlag = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Description() As String
            Get
                Return Me._description
            End Get
            Set
                Me._description = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyCustomsValueResale))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyCustomsValueResale object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyCustomsValueResale object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyCustomsValueResale 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 FCFCDFBodyCustomsValueResale, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyCustomsValueResale)
            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 FCFCDFBodyCustomsValueResale) 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 FCFCDFBodyCustomsValueResale
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyCustomsValueResale)
            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 FCFCDFBodyCustomsValueResale
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyCustomsValueResale)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyCustomsValueResale 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyCustomsValueResale object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyCustomsValueResale 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyCustomsValueResale, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyCustomsValueResale)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyCustomsValueResale, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyCustomsValueResale) 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 FCFCDFBodyCustomsValueResale
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyCustomsValueResale
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyDocument
        
        #Region "Private fields"
        Private _division As FCFCDFBodyDocumentDivision
        
        Private _type As String
        
        Private _referenceNumber As String
        
        Private _issuingDate As Date
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Division() As FCFCDFBodyDocumentDivision
            Get
                Return Me._division
            End Get
            Set
                Me._division = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Type() As String
            Get
                Return Me._type
            End Get
            Set
                Me._type = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set
                Me._referenceNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="date", Order:=3)>  _
        Public Property IssuingDate() As Date
            Get
                Return Me._issuingDate
            End Get
            Set
                Me._issuingDate = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyDocument))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyDocument object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyDocument object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyDocument 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 FCFCDFBodyDocument, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyDocument)
            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 FCFCDFBodyDocument) 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 FCFCDFBodyDocument
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyDocument)
            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 FCFCDFBodyDocument
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyDocument)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyDocument 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyDocument object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyDocument 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyDocument, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyDocument)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyDocument, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyDocument) 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 FCFCDFBodyDocument
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyDocument
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Public Enum FCFCDFBodyDocumentDivision
        
        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("4")>  _
        Item4
    End Enum
    
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItem
        
        #Region "Private fields"
        Private _sequenceNumber As String
        
        Private _procedure As FCFCDFBodyGoodsItemProcedure
        
        Private _cessionManagementFlag As String
        
        Private _goodsDescription As String
        
        Private _invoiceAmount As Decimal
        
        Private _netMassMeasure As Decimal
        
        Private _tobaccoRevenueStampNumber As String
        
        Private _originCountry As String
        
        Private _preferentialOriginCountry As String
        
        Private _supplementaryInformation As String
        
        Private _condition As String
        
        Private _commodityCode As FCFCDFBodyGoodsItemCommodityCode
        
        Private _additionalProcedure As List(Of FCFCDFBodyGoodsItemAdditionalProcedure)
        
        Private _supplementaryCodes As List(Of FCFCDFBodyGoodsItemSupplementaryCodes)
        
        Private _package As FCFCDFBodyGoodsItemPackage
        
        Private _foreignTradeStatistics As FCFCDFBodyGoodsItemForeignTradeStatistics
        
        Private _customsValue As FCFCDFBodyGoodsItemCustomsValue
        
        Private _assessment As FCFCDFBodyGoodsItemAssessment
        
        Private _exciseDuty As List(Of FCFCDFBodyGoodsItemExciseDuty)
        
        Private _preferentialTreatment As FCFCDFBodyGoodsItemPreferentialTreatment
        
        Private _specialCase As List(Of FCFCDFBodyGoodsItemSpecialCase)
        
        Private _document As List(Of FCFCDFBodyGoodsItemDocument)
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._document = New List(Of FCFCDFBodyGoodsItemDocument)()
            Me._specialCase = New List(Of FCFCDFBodyGoodsItemSpecialCase)()
            Me._preferentialTreatment = New FCFCDFBodyGoodsItemPreferentialTreatment()
            Me._exciseDuty = New List(Of FCFCDFBodyGoodsItemExciseDuty)()
            Me._assessment = New FCFCDFBodyGoodsItemAssessment()
            Me._customsValue = New FCFCDFBodyGoodsItemCustomsValue()
            Me._foreignTradeStatistics = New FCFCDFBodyGoodsItemForeignTradeStatistics()
            Me._package = New FCFCDFBodyGoodsItemPackage()
            Me._supplementaryCodes = New List(Of FCFCDFBodyGoodsItemSupplementaryCodes)()
            Me._additionalProcedure = New List(Of FCFCDFBodyGoodsItemAdditionalProcedure)()
            Me._commodityCode = New FCFCDFBodyGoodsItemCommodityCode()
            Me._procedure = New FCFCDFBodyGoodsItemProcedure()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer", Order:=0)>  _
        Public Property SequenceNumber() As String
            Get
                Return Me._sequenceNumber
            End Get
            Set
                Me._sequenceNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=1)>  _
        Public Property Procedure() As FCFCDFBodyGoodsItemProcedure
            Get
                Return Me._procedure
            End Get
            Set
                Me._procedure = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property CessionManagementFlag() As String
            Get
                Return Me._cessionManagementFlag
            End Get
            Set
                Me._cessionManagementFlag = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=3)>  _
        Public Property GoodsDescription() As String
            Get
                Return Me._goodsDescription
            End Get
            Set
                Me._goodsDescription = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=4)>  _
        Public Property InvoiceAmount() As Decimal
            Get
                Return Me._invoiceAmount
            End Get
            Set
                Me._invoiceAmount = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=5)>  _
        Public Property NetMassMeasure() As Decimal
            Get
                Return Me._netMassMeasure
            End Get
            Set
                Me._netMassMeasure = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=6)>  _
        Public Property TobaccoRevenueStampNumber() As String
            Get
                Return Me._tobaccoRevenueStampNumber
            End Get
            Set
                Me._tobaccoRevenueStampNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=7)>  _
        Public Property OriginCountry() As String
            Get
                Return Me._originCountry
            End Get
            Set
                Me._originCountry = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=8)>  _
        Public Property PreferentialOriginCountry() As String
            Get
                Return Me._preferentialOriginCountry
            End Get
            Set
                Me._preferentialOriginCountry = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=9)>  _
        Public Property SupplementaryInformation() As String
            Get
                Return Me._supplementaryInformation
            End Get
            Set
                Me._supplementaryInformation = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=10)>  _
        Public Property Condition() As String
            Get
                Return Me._condition
            End Get
            Set
                Me._condition = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=11)>  _
        Public Property CommodityCode() As FCFCDFBodyGoodsItemCommodityCode
            Get
                Return Me._commodityCode
            End Get
            Set
                Me._commodityCode = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute("AdditionalProcedure", Order:=12)>  _
        Public Property AdditionalProcedure() As List(Of FCFCDFBodyGoodsItemAdditionalProcedure)
            Get
                Return Me._additionalProcedure
            End Get
            Set
                Me._additionalProcedure = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute("SupplementaryCodes", Order:=13)>  _
        Public Property SupplementaryCodes() As List(Of FCFCDFBodyGoodsItemSupplementaryCodes)
            Get
                Return Me._supplementaryCodes
            End Get
            Set
                Me._supplementaryCodes = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=14)>  _
        Public Property Package() As FCFCDFBodyGoodsItemPackage
            Get
                Return Me._package
            End Get
            Set
                Me._package = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=15)>  _
        Public Property ForeignTradeStatistics() As FCFCDFBodyGoodsItemForeignTradeStatistics
            Get
                Return Me._foreignTradeStatistics
            End Get
            Set
                Me._foreignTradeStatistics = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=16)>  _
        Public Property CustomsValue() As FCFCDFBodyGoodsItemCustomsValue
            Get
                Return Me._customsValue
            End Get
            Set
                Me._customsValue = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=17)>  _
        Public Property Assessment() As FCFCDFBodyGoodsItemAssessment
            Get
                Return Me._assessment
            End Get
            Set
                Me._assessment = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute("ExciseDuty", Order:=18)>  _
        Public Property ExciseDuty() As List(Of FCFCDFBodyGoodsItemExciseDuty)
            Get
                Return Me._exciseDuty
            End Get
            Set
                Me._exciseDuty = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=19)>  _
        Public Property PreferentialTreatment() As FCFCDFBodyGoodsItemPreferentialTreatment
            Get
                Return Me._preferentialTreatment
            End Get
            Set
                Me._preferentialTreatment = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute("SpecialCase", Order:=20)>  _
        Public Property SpecialCase() As List(Of FCFCDFBodyGoodsItemSpecialCase)
            Get
                Return Me._specialCase
            End Get
            Set
                Me._specialCase = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute("Document", Order:=21)>  _
        Public Property Document() As List(Of FCFCDFBodyGoodsItemDocument)
            Get
                Return Me._document
            End Get
            Set
                Me._document = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItem))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItem object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItem object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItem 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 FCFCDFBodyGoodsItem, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItem)
            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 FCFCDFBodyGoodsItem) 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 FCFCDFBodyGoodsItem
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItem)
            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 FCFCDFBodyGoodsItem
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItem)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItem 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItem object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItem 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItem, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItem)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItem, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItem) 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 FCFCDFBodyGoodsItem
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItem
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemProcedure
        
        #Region "Private fields"
        Private _requestedPreviousProcedure As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property RequestedPreviousProcedure() As String
            Get
                Return Me._requestedPreviousProcedure
            End Get
            Set
                Me._requestedPreviousProcedure = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemProcedure))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemProcedure object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemProcedure object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemProcedure 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 FCFCDFBodyGoodsItemProcedure, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemProcedure)
            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 FCFCDFBodyGoodsItemProcedure) 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 FCFCDFBodyGoodsItemProcedure
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemProcedure)
            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 FCFCDFBodyGoodsItemProcedure
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemProcedure)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemProcedure 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemProcedure object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemProcedure 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemProcedure, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemProcedure)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemProcedure, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemProcedure) 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 FCFCDFBodyGoodsItemProcedure
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemProcedure
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemCommodityCode
        
        #Region "Private fields"
        Private _commodityCode As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property CommodityCode() As String
            Get
                Return Me._commodityCode
            End Get
            Set
                Me._commodityCode = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemCommodityCode))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemCommodityCode object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemCommodityCode object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemCommodityCode 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 FCFCDFBodyGoodsItemCommodityCode, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemCommodityCode)
            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 FCFCDFBodyGoodsItemCommodityCode) 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 FCFCDFBodyGoodsItemCommodityCode
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemCommodityCode)
            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 FCFCDFBodyGoodsItemCommodityCode
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemCommodityCode)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemCommodityCode 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemCommodityCode object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemCommodityCode 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemCommodityCode, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemCommodityCode)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemCommodityCode, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemCommodityCode) 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 FCFCDFBodyGoodsItemCommodityCode
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemCommodityCode
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemAdditionalProcedure
        
        #Region "Private fields"
        Private _code As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Code() As String
            Get
                Return Me._code
            End Get
            Set
                Me._code = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemAdditionalProcedure))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemAdditionalProcedure object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemAdditionalProcedure object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemAdditionalProcedure 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 FCFCDFBodyGoodsItemAdditionalProcedure, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemAdditionalProcedure)
            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 FCFCDFBodyGoodsItemAdditionalProcedure) 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 FCFCDFBodyGoodsItemAdditionalProcedure
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemAdditionalProcedure)
            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 FCFCDFBodyGoodsItemAdditionalProcedure
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemAdditionalProcedure)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemAdditionalProcedure 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemAdditionalProcedure object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemAdditionalProcedure 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemAdditionalProcedure, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemAdditionalProcedure)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemAdditionalProcedure, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemAdditionalProcedure) 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 FCFCDFBodyGoodsItemAdditionalProcedure
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemAdditionalProcedure
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemSupplementaryCodes
        
        #Region "Private fields"
        Private _code As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Code() As String
            Get
                Return Me._code
            End Get
            Set
                Me._code = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemSupplementaryCodes))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemSupplementaryCodes object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemSupplementaryCodes object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemSupplementaryCodes 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 FCFCDFBodyGoodsItemSupplementaryCodes, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemSupplementaryCodes)
            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 FCFCDFBodyGoodsItemSupplementaryCodes) 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 FCFCDFBodyGoodsItemSupplementaryCodes
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemSupplementaryCodes)
            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 FCFCDFBodyGoodsItemSupplementaryCodes
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemSupplementaryCodes)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemSupplementaryCodes 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemSupplementaryCodes object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemSupplementaryCodes 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemSupplementaryCodes, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemSupplementaryCodes)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemSupplementaryCodes, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemSupplementaryCodes) 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 FCFCDFBodyGoodsItemSupplementaryCodes
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemSupplementaryCodes
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemPackage
        
        #Region "Private fields"
        Private _kind As String
        
        Private _quantity As String
        
        Private _marksNumbers As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Kind() As String
            Get
                Return Me._kind
            End Get
            Set
                Me._kind = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer", Order:=1)>  _
        Public Property Quantity() As String
            Get
                Return Me._quantity
            End Get
            Set
                Me._quantity = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property MarksNumbers() As String
            Get
                Return Me._marksNumbers
            End Get
            Set
                Me._marksNumbers = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemPackage))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemPackage object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemPackage object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemPackage 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 FCFCDFBodyGoodsItemPackage, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemPackage)
            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 FCFCDFBodyGoodsItemPackage) 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 FCFCDFBodyGoodsItemPackage
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemPackage)
            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 FCFCDFBodyGoodsItemPackage
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemPackage)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemPackage 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemPackage object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemPackage 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemPackage, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemPackage)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemPackage, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemPackage) 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 FCFCDFBodyGoodsItemPackage
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemPackage
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemForeignTradeStatistics
        
        #Region "Private fields"
        Private _quantity As String
        
        Private _grossMassMeasure As Decimal
        
        Private _amount As FCFCDFBodyGoodsItemForeignTradeStatisticsAmount
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._amount = New FCFCDFBodyGoodsItemForeignTradeStatisticsAmount()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer", Order:=0)>  _
        Public Property Quantity() As String
            Get
                Return Me._quantity
            End Get
            Set
                Me._quantity = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=1)>  _
        Public Property GrossMassMeasure() As Decimal
            Get
                Return Me._grossMassMeasure
            End Get
            Set
                Me._grossMassMeasure = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=2)>  _
        Public Property Amount() As FCFCDFBodyGoodsItemForeignTradeStatisticsAmount
            Get
                Return Me._amount
            End Get
            Set
                Me._amount = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemForeignTradeStatistics))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemForeignTradeStatistics object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemForeignTradeStatistics object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemForeignTradeStatistics 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 FCFCDFBodyGoodsItemForeignTradeStatistics, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemForeignTradeStatistics)
            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 FCFCDFBodyGoodsItemForeignTradeStatistics) 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 FCFCDFBodyGoodsItemForeignTradeStatistics
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemForeignTradeStatistics)
            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 FCFCDFBodyGoodsItemForeignTradeStatistics
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemForeignTradeStatistics)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemForeignTradeStatistics 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemForeignTradeStatistics object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemForeignTradeStatistics 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemForeignTradeStatistics, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemForeignTradeStatistics)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemForeignTradeStatistics, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemForeignTradeStatistics) 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 FCFCDFBodyGoodsItemForeignTradeStatistics
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemForeignTradeStatistics
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemForeignTradeStatisticsAmount
        
        #Region "Private fields"
        Private _quantity As Decimal
        
        Private _measurementUnit As String
        
        Private _qualifier As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Quantity() As Decimal
            Get
                Return Me._quantity
            End Get
            Set
                Me._quantity = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property MeasurementUnit() As String
            Get
                Return Me._measurementUnit
            End Get
            Set
                Me._measurementUnit = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property Qualifier() As String
            Get
                Return Me._qualifier
            End Get
            Set
                Me._qualifier = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemForeignTradeStatisticsAmount))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemForeignTradeStatisticsAmount object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemForeignTradeStatisticsAmount object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemForeignTradeStatisticsAmount 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 FCFCDFBodyGoodsItemForeignTradeStatisticsAmount, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemForeignTradeStatisticsAmount)
            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 FCFCDFBodyGoodsItemForeignTradeStatisticsAmount) 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 FCFCDFBodyGoodsItemForeignTradeStatisticsAmount
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemForeignTradeStatisticsAmount)
            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 FCFCDFBodyGoodsItemForeignTradeStatisticsAmount
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemForeignTradeStatisticsAmount)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemForeignTradeStatisticsAmount 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemForeignTradeStatisticsAmount object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemForeignTradeStatisticsAmount 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemForeignTradeStatisticsAmount, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemForeignTradeStatisticsAmount)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemForeignTradeStatisticsAmount, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemForeignTradeStatisticsAmount) 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 FCFCDFBodyGoodsItemForeignTradeStatisticsAmount
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemForeignTradeStatisticsAmount
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemCustomsValue
        
        #Region "Private fields"
        Private _departureAirport As String
        
        Private _destinationPlace As String
        
        Private _additionDeductionDescription As String
        
        Private _netPrice As FCFCDFBodyGoodsItemCustomsValueNetPrice
        
        Private _indirectPayment As FCFCDFBodyGoodsItemCustomsValueIndirectPayment
        
        Private _airFreightCosts As FCFCDFBodyGoodsItemCustomsValueAirFreightCosts
        
        Private _additionDeduction As List(Of FCFCDFBodyGoodsItemCustomsValueAdditionDeduction)
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._additionDeduction = New List(Of FCFCDFBodyGoodsItemCustomsValueAdditionDeduction)()
            Me._airFreightCosts = New FCFCDFBodyGoodsItemCustomsValueAirFreightCosts()
            Me._indirectPayment = New FCFCDFBodyGoodsItemCustomsValueIndirectPayment()
            Me._netPrice = New FCFCDFBodyGoodsItemCustomsValueNetPrice()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property DepartureAirport() As String
            Get
                Return Me._departureAirport
            End Get
            Set
                Me._departureAirport = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property DestinationPlace() As String
            Get
                Return Me._destinationPlace
            End Get
            Set
                Me._destinationPlace = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property AdditionDeductionDescription() As String
            Get
                Return Me._additionDeductionDescription
            End Get
            Set
                Me._additionDeductionDescription = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=3)>  _
        Public Property NetPrice() As FCFCDFBodyGoodsItemCustomsValueNetPrice
            Get
                Return Me._netPrice
            End Get
            Set
                Me._netPrice = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=4)>  _
        Public Property IndirectPayment() As FCFCDFBodyGoodsItemCustomsValueIndirectPayment
            Get
                Return Me._indirectPayment
            End Get
            Set
                Me._indirectPayment = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=5)>  _
        Public Property AirFreightCosts() As FCFCDFBodyGoodsItemCustomsValueAirFreightCosts
            Get
                Return Me._airFreightCosts
            End Get
            Set
                Me._airFreightCosts = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute("AdditionDeduction", Order:=6)>  _
        Public Property AdditionDeduction() As List(Of FCFCDFBodyGoodsItemCustomsValueAdditionDeduction)
            Get
                Return Me._additionDeduction
            End Get
            Set
                Me._additionDeduction = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemCustomsValue))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemCustomsValue object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemCustomsValue object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemCustomsValue 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 FCFCDFBodyGoodsItemCustomsValue, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemCustomsValue)
            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 FCFCDFBodyGoodsItemCustomsValue) 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 FCFCDFBodyGoodsItemCustomsValue
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemCustomsValue)
            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 FCFCDFBodyGoodsItemCustomsValue
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemCustomsValue)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemCustomsValue 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemCustomsValue object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemCustomsValue 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemCustomsValue, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemCustomsValue)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemCustomsValue, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValue) 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 FCFCDFBodyGoodsItemCustomsValue
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemCustomsValue
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemCustomsValueNetPrice
        
        #Region "Private fields"
        Private _value As Decimal
        
        Private _currencyCode As String
        
        Private _currencyRateAgreedFlag As String
        
        Private _currencyRate As Decimal
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Value() As Decimal
            Get
                Return Me._value
            End Get
            Set
                Me._value = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property CurrencyCode() As String
            Get
                Return Me._currencyCode
            End Get
            Set
                Me._currencyCode = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property CurrencyRateAgreedFlag() As String
            Get
                Return Me._currencyRateAgreedFlag
            End Get
            Set
                Me._currencyRateAgreedFlag = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=3)>  _
        Public Property CurrencyRate() As Decimal
            Get
                Return Me._currencyRate
            End Get
            Set
                Me._currencyRate = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemCustomsValueNetPrice))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemCustomsValueNetPrice object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemCustomsValueNetPrice object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemCustomsValueNetPrice 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 FCFCDFBodyGoodsItemCustomsValueNetPrice, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemCustomsValueNetPrice)
            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 FCFCDFBodyGoodsItemCustomsValueNetPrice) 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 FCFCDFBodyGoodsItemCustomsValueNetPrice
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemCustomsValueNetPrice)
            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 FCFCDFBodyGoodsItemCustomsValueNetPrice
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemCustomsValueNetPrice)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemCustomsValueNetPrice 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemCustomsValueNetPrice object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemCustomsValueNetPrice 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemCustomsValueNetPrice, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemCustomsValueNetPrice)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemCustomsValueNetPrice, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValueNetPrice) 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 FCFCDFBodyGoodsItemCustomsValueNetPrice
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemCustomsValueNetPrice
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemCustomsValueIndirectPayment
        
        #Region "Private fields"
        Private _value As Decimal
        
        Private _currencyCode As String
        
        Private _currencyRateAgreedFlag As String
        
        Private _currencyRate As Decimal
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Value() As Decimal
            Get
                Return Me._value
            End Get
            Set
                Me._value = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property CurrencyCode() As String
            Get
                Return Me._currencyCode
            End Get
            Set
                Me._currencyCode = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property CurrencyRateAgreedFlag() As String
            Get
                Return Me._currencyRateAgreedFlag
            End Get
            Set
                Me._currencyRateAgreedFlag = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=3)>  _
        Public Property CurrencyRate() As Decimal
            Get
                Return Me._currencyRate
            End Get
            Set
                Me._currencyRate = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemCustomsValueIndirectPayment))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemCustomsValueIndirectPayment object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemCustomsValueIndirectPayment object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemCustomsValueIndirectPayment 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 FCFCDFBodyGoodsItemCustomsValueIndirectPayment, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemCustomsValueIndirectPayment)
            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 FCFCDFBodyGoodsItemCustomsValueIndirectPayment) 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 FCFCDFBodyGoodsItemCustomsValueIndirectPayment
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemCustomsValueIndirectPayment)
            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 FCFCDFBodyGoodsItemCustomsValueIndirectPayment
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemCustomsValueIndirectPayment)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemCustomsValueIndirectPayment 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemCustomsValueIndirectPayment object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemCustomsValueIndirectPayment 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemCustomsValueIndirectPayment, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemCustomsValueIndirectPayment)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemCustomsValueIndirectPayment, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValueIndirectPayment) 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 FCFCDFBodyGoodsItemCustomsValueIndirectPayment
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemCustomsValueIndirectPayment
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemCustomsValueAirFreightCosts
        
        #Region "Private fields"
        Private _value As Decimal
        
        Private _currencyCode As String
        
        Private _currencyRateIATA As String
        
        Private _currencyRateAgreedFlag As String
        
        Private _currencyRate As Decimal
        
        Private _currencyRateDate As Date
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Value() As Decimal
            Get
                Return Me._value
            End Get
            Set
                Me._value = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property CurrencyCode() As String
            Get
                Return Me._currencyCode
            End Get
            Set
                Me._currencyCode = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property CurrencyRateIATA() As String
            Get
                Return Me._currencyRateIATA
            End Get
            Set
                Me._currencyRateIATA = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=3)>  _
        Public Property CurrencyRateAgreedFlag() As String
            Get
                Return Me._currencyRateAgreedFlag
            End Get
            Set
                Me._currencyRateAgreedFlag = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=4)>  _
        Public Property CurrencyRate() As Decimal
            Get
                Return Me._currencyRate
            End Get
            Set
                Me._currencyRate = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="date", Order:=5)>  _
        Public Property CurrencyRateDate() As Date
            Get
                Return Me._currencyRateDate
            End Get
            Set
                Me._currencyRateDate = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemCustomsValueAirFreightCosts))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemCustomsValueAirFreightCosts object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemCustomsValueAirFreightCosts object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemCustomsValueAirFreightCosts 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 FCFCDFBodyGoodsItemCustomsValueAirFreightCosts, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemCustomsValueAirFreightCosts)
            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 FCFCDFBodyGoodsItemCustomsValueAirFreightCosts) 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 FCFCDFBodyGoodsItemCustomsValueAirFreightCosts
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemCustomsValueAirFreightCosts)
            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 FCFCDFBodyGoodsItemCustomsValueAirFreightCosts
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemCustomsValueAirFreightCosts)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemCustomsValueAirFreightCosts 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemCustomsValueAirFreightCosts object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemCustomsValueAirFreightCosts 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemCustomsValueAirFreightCosts, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemCustomsValueAirFreightCosts)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemCustomsValueAirFreightCosts, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValueAirFreightCosts) 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 FCFCDFBodyGoodsItemCustomsValueAirFreightCosts
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemCustomsValueAirFreightCosts
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemCustomsValueAdditionDeduction
        
        #Region "Private fields"
        Private _type As String
        
        Private _value As Decimal
        
        Private _currencyCode As String
        
        Private _currencyRateIATA As String
        
        Private _currencyRateAgreedFlag As String
        
        Private _currencyRate As Decimal
        
        Private _currencyRateDate As Date
        
        Private _percentage As Decimal
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Type() As String
            Get
                Return Me._type
            End Get
            Set
                Me._type = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=1)>  _
        Public Property Value() As Decimal
            Get
                Return Me._value
            End Get
            Set
                Me._value = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property CurrencyCode() As String
            Get
                Return Me._currencyCode
            End Get
            Set
                Me._currencyCode = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=3)>  _
        Public Property CurrencyRateIATA() As String
            Get
                Return Me._currencyRateIATA
            End Get
            Set
                Me._currencyRateIATA = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=4)>  _
        Public Property CurrencyRateAgreedFlag() As String
            Get
                Return Me._currencyRateAgreedFlag
            End Get
            Set
                Me._currencyRateAgreedFlag = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=5)>  _
        Public Property CurrencyRate() As Decimal
            Get
                Return Me._currencyRate
            End Get
            Set
                Me._currencyRate = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="date", Order:=6)>  _
        Public Property CurrencyRateDate() As Date
            Get
                Return Me._currencyRateDate
            End Get
            Set
                Me._currencyRateDate = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=7)>  _
        Public Property Percentage() As Decimal
            Get
                Return Me._percentage
            End Get
            Set
                Me._percentage = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemCustomsValueAdditionDeduction))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemCustomsValueAdditionDeduction object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemCustomsValueAdditionDeduction object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemCustomsValueAdditionDeduction 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 FCFCDFBodyGoodsItemCustomsValueAdditionDeduction, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemCustomsValueAdditionDeduction)
            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 FCFCDFBodyGoodsItemCustomsValueAdditionDeduction) 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 FCFCDFBodyGoodsItemCustomsValueAdditionDeduction
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemCustomsValueAdditionDeduction)
            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 FCFCDFBodyGoodsItemCustomsValueAdditionDeduction
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemCustomsValueAdditionDeduction)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemCustomsValueAdditionDeduction 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemCustomsValueAdditionDeduction object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemCustomsValueAdditionDeduction 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemCustomsValueAdditionDeduction, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemCustomsValueAdditionDeduction)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemCustomsValueAdditionDeduction, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemCustomsValueAdditionDeduction) 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 FCFCDFBodyGoodsItemCustomsValueAdditionDeduction
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemCustomsValueAdditionDeduction
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemAssessment
        
        #Region "Private fields"
        Private _customsValue As Decimal
        
        Private _outwardProcessingFee As Decimal
        
        Private _taxCosts As Decimal
        
        Private _amount As List(Of FCFCDFBodyGoodsItemAssessmentAmount)
        
        Private _specificRate As List(Of FCFCDFBodyGoodsItemAssessmentSpecificRate)
        
        Private _contentInformation As List(Of FCFCDFBodyGoodsItemAssessmentContentInformation)
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._contentInformation = New List(Of FCFCDFBodyGoodsItemAssessmentContentInformation)()
            Me._specificRate = New List(Of FCFCDFBodyGoodsItemAssessmentSpecificRate)()
            Me._amount = New List(Of FCFCDFBodyGoodsItemAssessmentAmount)()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property CustomsValue() As Decimal
            Get
                Return Me._customsValue
            End Get
            Set
                Me._customsValue = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=1)>  _
        Public Property OutwardProcessingFee() As Decimal
            Get
                Return Me._outwardProcessingFee
            End Get
            Set
                Me._outwardProcessingFee = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=2)>  _
        Public Property TaxCosts() As Decimal
            Get
                Return Me._taxCosts
            End Get
            Set
                Me._taxCosts = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute("Amount", Order:=3)>  _
        Public Property Amount() As List(Of FCFCDFBodyGoodsItemAssessmentAmount)
            Get
                Return Me._amount
            End Get
            Set
                Me._amount = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute("SpecificRate", Order:=4)>  _
        Public Property SpecificRate() As List(Of FCFCDFBodyGoodsItemAssessmentSpecificRate)
            Get
                Return Me._specificRate
            End Get
            Set
                Me._specificRate = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute("ContentInformation", Order:=5)>  _
        Public Property ContentInformation() As List(Of FCFCDFBodyGoodsItemAssessmentContentInformation)
            Get
                Return Me._contentInformation
            End Get
            Set
                Me._contentInformation = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemAssessment))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemAssessment object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemAssessment object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemAssessment 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 FCFCDFBodyGoodsItemAssessment, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemAssessment)
            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 FCFCDFBodyGoodsItemAssessment) 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 FCFCDFBodyGoodsItemAssessment
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemAssessment)
            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 FCFCDFBodyGoodsItemAssessment
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemAssessment)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemAssessment 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemAssessment object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemAssessment 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemAssessment, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemAssessment)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemAssessment, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemAssessment) 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 FCFCDFBodyGoodsItemAssessment
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemAssessment
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemAssessmentAmount
        
        #Region "Private fields"
        Private _quantity As Decimal
        
        Private _measurementUnit As String
        
        Private _qualifier As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Quantity() As Decimal
            Get
                Return Me._quantity
            End Get
            Set
                Me._quantity = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property MeasurementUnit() As String
            Get
                Return Me._measurementUnit
            End Get
            Set
                Me._measurementUnit = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property Qualifier() As String
            Get
                Return Me._qualifier
            End Get
            Set
                Me._qualifier = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemAssessmentAmount))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemAssessmentAmount object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemAssessmentAmount object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemAssessmentAmount 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 FCFCDFBodyGoodsItemAssessmentAmount, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemAssessmentAmount)
            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 FCFCDFBodyGoodsItemAssessmentAmount) 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 FCFCDFBodyGoodsItemAssessmentAmount
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemAssessmentAmount)
            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 FCFCDFBodyGoodsItemAssessmentAmount
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemAssessmentAmount)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemAssessmentAmount 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemAssessmentAmount object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemAssessmentAmount 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemAssessmentAmount, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemAssessmentAmount)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemAssessmentAmount, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemAssessmentAmount) 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 FCFCDFBodyGoodsItemAssessmentAmount
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemAssessmentAmount
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemAssessmentSpecificRate
        
        #Region "Private fields"
        Private _type As String
        
        Private _value As Decimal
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Type() As String
            Get
                Return Me._type
            End Get
            Set
                Me._type = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=1)>  _
        Public Property Value() As Decimal
            Get
                Return Me._value
            End Get
            Set
                Me._value = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemAssessmentSpecificRate))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemAssessmentSpecificRate object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemAssessmentSpecificRate object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemAssessmentSpecificRate 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 FCFCDFBodyGoodsItemAssessmentSpecificRate, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemAssessmentSpecificRate)
            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 FCFCDFBodyGoodsItemAssessmentSpecificRate) 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 FCFCDFBodyGoodsItemAssessmentSpecificRate
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemAssessmentSpecificRate)
            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 FCFCDFBodyGoodsItemAssessmentSpecificRate
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemAssessmentSpecificRate)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemAssessmentSpecificRate 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemAssessmentSpecificRate object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemAssessmentSpecificRate 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemAssessmentSpecificRate, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemAssessmentSpecificRate)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemAssessmentSpecificRate, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemAssessmentSpecificRate) 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 FCFCDFBodyGoodsItemAssessmentSpecificRate
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemAssessmentSpecificRate
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemAssessmentContentInformation
        
        #Region "Private fields"
        Private _type As String
        
        Private _degreePercentage As Decimal
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Type() As String
            Get
                Return Me._type
            End Get
            Set
                Me._type = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute("Degree-Percentage", Order:=1)>  _
        Public Property DegreePercentage() As Decimal
            Get
                Return Me._degreePercentage
            End Get
            Set
                Me._degreePercentage = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemAssessmentContentInformation))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemAssessmentContentInformation object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemAssessmentContentInformation object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemAssessmentContentInformation 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 FCFCDFBodyGoodsItemAssessmentContentInformation, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemAssessmentContentInformation)
            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 FCFCDFBodyGoodsItemAssessmentContentInformation) 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 FCFCDFBodyGoodsItemAssessmentContentInformation
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemAssessmentContentInformation)
            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 FCFCDFBodyGoodsItemAssessmentContentInformation
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemAssessmentContentInformation)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemAssessmentContentInformation 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemAssessmentContentInformation object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemAssessmentContentInformation 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemAssessmentContentInformation, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemAssessmentContentInformation)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemAssessmentContentInformation, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemAssessmentContentInformation) 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 FCFCDFBodyGoodsItemAssessmentContentInformation
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemAssessmentContentInformation
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemExciseDuty
        
        #Region "Private fields"
        Private _code As String
        
        Private _degreePercentage As Decimal
        
        Private _value As Decimal
        
        Private _amount As FCFCDFBodyGoodsItemExciseDutyAmount
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._amount = New FCFCDFBodyGoodsItemExciseDutyAmount()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Code() As String
            Get
                Return Me._code
            End Get
            Set
                Me._code = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute("Degree-Percentage", Order:=1)>  _
        Public Property DegreePercentage() As Decimal
            Get
                Return Me._degreePercentage
            End Get
            Set
                Me._degreePercentage = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=2)>  _
        Public Property Value() As Decimal
            Get
                Return Me._value
            End Get
            Set
                Me._value = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=3)>  _
        Public Property Amount() As FCFCDFBodyGoodsItemExciseDutyAmount
            Get
                Return Me._amount
            End Get
            Set
                Me._amount = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemExciseDuty))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemExciseDuty object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemExciseDuty object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemExciseDuty 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 FCFCDFBodyGoodsItemExciseDuty, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemExciseDuty)
            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 FCFCDFBodyGoodsItemExciseDuty) 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 FCFCDFBodyGoodsItemExciseDuty
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemExciseDuty)
            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 FCFCDFBodyGoodsItemExciseDuty
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemExciseDuty)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemExciseDuty 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemExciseDuty object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemExciseDuty 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemExciseDuty, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemExciseDuty)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemExciseDuty, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemExciseDuty) 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 FCFCDFBodyGoodsItemExciseDuty
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemExciseDuty
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemExciseDutyAmount
        
        #Region "Private fields"
        Private _quantity As Decimal
        
        Private _measurementUnit As String
        
        Private _qualifier As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Quantity() As Decimal
            Get
                Return Me._quantity
            End Get
            Set
                Me._quantity = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property MeasurementUnit() As String
            Get
                Return Me._measurementUnit
            End Get
            Set
                Me._measurementUnit = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property Qualifier() As String
            Get
                Return Me._qualifier
            End Get
            Set
                Me._qualifier = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemExciseDutyAmount))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemExciseDutyAmount object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemExciseDutyAmount object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemExciseDutyAmount 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 FCFCDFBodyGoodsItemExciseDutyAmount, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemExciseDutyAmount)
            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 FCFCDFBodyGoodsItemExciseDutyAmount) 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 FCFCDFBodyGoodsItemExciseDutyAmount
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemExciseDutyAmount)
            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 FCFCDFBodyGoodsItemExciseDutyAmount
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemExciseDutyAmount)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemExciseDutyAmount 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemExciseDutyAmount object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemExciseDutyAmount 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemExciseDutyAmount, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemExciseDutyAmount)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemExciseDutyAmount, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemExciseDutyAmount) 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 FCFCDFBodyGoodsItemExciseDutyAmount
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemExciseDutyAmount
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemPreferentialTreatment
        
        #Region "Private fields"
        Private _requestedPreferentialTreatment As String
        
        Private _declaration As FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._declaration = New FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property RequestedPreferentialTreatment() As String
            Get
                Return Me._requestedPreferentialTreatment
            End Get
            Set
                Me._requestedPreferentialTreatment = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=1)>  _
        Public Property Declaration() As FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration
            Get
                Return Me._declaration
            End Get
            Set
                Me._declaration = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemPreferentialTreatment))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemPreferentialTreatment object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemPreferentialTreatment object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemPreferentialTreatment 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 FCFCDFBodyGoodsItemPreferentialTreatment, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemPreferentialTreatment)
            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 FCFCDFBodyGoodsItemPreferentialTreatment) 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 FCFCDFBodyGoodsItemPreferentialTreatment
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemPreferentialTreatment)
            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 FCFCDFBodyGoodsItemPreferentialTreatment
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemPreferentialTreatment)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemPreferentialTreatment 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemPreferentialTreatment object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemPreferentialTreatment 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatment, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemPreferentialTreatment)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemPreferentialTreatment, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatment) 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 FCFCDFBodyGoodsItemPreferentialTreatment
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemPreferentialTreatment
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration
        
        #Region "Private fields"
        Private _contingent As List(Of FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent)
        
        Private _preferentialTreatmentQuantity As FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._preferentialTreatmentQuantity = New FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity()
            Me._contingent = New List(Of FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent)()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute("Contingent", Order:=0)>  _
        Public Property Contingent() As List(Of FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent)
            Get
                Return Me._contingent
            End Get
            Set
                Me._contingent = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=1)>  _
        Public Property PreferentialTreatmentQuantity() As FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity
            Get
                Return Me._preferentialTreatmentQuantity
            End Get
            Set
                Me._preferentialTreatmentQuantity = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration 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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration)
            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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration) 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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration)
            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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration) 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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemPreferentialTreatmentDeclaration
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent
        
        #Region "Private fields"
        Private _contingentNumber As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property ContingentNumber() As String
            Get
                Return Me._contingentNumber
            End Get
            Set
                Me._contingentNumber = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent 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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent)
            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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent) 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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent)
            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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent) 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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationContingent
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity
        
        #Region "Private fields"
        Private _quantity As String
        
        Private _measurementUnit As String
        
        Private _qualifier As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer", Order:=0)>  _
        Public Property Quantity() As String
            Get
                Return Me._quantity
            End Get
            Set
                Me._quantity = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property MeasurementUnit() As String
            Get
                Return Me._measurementUnit
            End Get
            Set
                Me._measurementUnit = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property Qualifier() As String
            Get
                Return Me._qualifier
            End Get
            Set
                Me._qualifier = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity 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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity)
            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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity) 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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity)
            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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity) 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 FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemSpecialCase
        
        #Region "Private fields"
        Private _group As String
        
        Private _applicationType As String
        
        Private _rateOrAmountOrFactor As Decimal
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Group() As String
            Get
                Return Me._group
            End Get
            Set
                Me._group = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property ApplicationType() As String
            Get
                Return Me._applicationType
            End Get
            Set
                Me._applicationType = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=2)>  _
        Public Property RateOrAmountOrFactor() As Decimal
            Get
                Return Me._rateOrAmountOrFactor
            End Get
            Set
                Me._rateOrAmountOrFactor = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemSpecialCase))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemSpecialCase object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemSpecialCase object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemSpecialCase 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 FCFCDFBodyGoodsItemSpecialCase, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemSpecialCase)
            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 FCFCDFBodyGoodsItemSpecialCase) 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 FCFCDFBodyGoodsItemSpecialCase
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemSpecialCase)
            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 FCFCDFBodyGoodsItemSpecialCase
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemSpecialCase)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemSpecialCase 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemSpecialCase object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemSpecialCase 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemSpecialCase, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemSpecialCase)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemSpecialCase, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemSpecialCase) 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 FCFCDFBodyGoodsItemSpecialCase
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemSpecialCase
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemDocument
        
        #Region "Private fields"
        Private _division As String
        
        Private _type As String
        
        Private _referenceNumber As String
        
        Private _issuingDate As Date
        
        Private _atHandFlag As String
        
        Private _writeOff As FCFCDFBodyGoodsItemDocumentWriteOff
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        Public Sub New()
            MyBase.New
            Me._writeOff = New FCFCDFBodyGoodsItemDocumentWriteOff()
        End Sub
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=0)>  _
        Public Property Division() As String
            Get
                Return Me._division
            End Get
            Set
                Me._division = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property Type() As String
            Get
                Return Me._type
            End Get
            Set
                Me._type = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set
                Me._referenceNumber = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="date", Order:=3)>  _
        Public Property IssuingDate() As Date
            Get
                Return Me._issuingDate
            End Get
            Set
                Me._issuingDate = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=4)>  _
        Public Property AtHandFlag() As String
            Get
                Return Me._atHandFlag
            End Get
            Set
                Me._atHandFlag = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=5)>  _
        Public Property WriteOff() As FCFCDFBodyGoodsItemDocumentWriteOff
            Get
                Return Me._writeOff
            End Get
            Set
                Me._writeOff = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemDocument))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemDocument object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemDocument object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemDocument 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 FCFCDFBodyGoodsItemDocument, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemDocument)
            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 FCFCDFBodyGoodsItemDocument) 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 FCFCDFBodyGoodsItemDocument
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemDocument)
            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 FCFCDFBodyGoodsItemDocument
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemDocument)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemDocument 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemDocument object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemDocument 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemDocument, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemDocument)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemDocument, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemDocument) 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 FCFCDFBodyGoodsItemDocument
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemDocument
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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.8.4084.0"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)>  _
    Partial Public Class FCFCDFBodyGoodsItemDocumentWriteOff
        
        #Region "Private fields"
        Private _quantity As Decimal
        
        Private _measurementUnit As String
        
        Private _qualifier As String
        
        Private Shared _serializerXml As XmlSerializer
        #End Region
        
        <System.Xml.Serialization.XmlElementAttribute(Order:=0)>  _
        Public Property Quantity() As Decimal
            Get
                Return Me._quantity
            End Get
            Set
                Me._quantity = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=1)>  _
        Public Property MeasurementUnit() As String
            Get
                Return Me._measurementUnit
            End Get
            Set
                Me._measurementUnit = value
            End Set
        End Property
        
        <System.Xml.Serialization.XmlElementAttribute(DataType:="token", Order:=2)>  _
        Public Property Qualifier() As String
            Get
                Return Me._qualifier
            End Get
            Set
                Me._qualifier = value
            End Set
        End Property
        
        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDFBodyGoodsItemDocumentWriteOff))
                End If
                Return _serializerXml
            End Get
        End Property
        
        #Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FCFCDFBodyGoodsItemDocumentWriteOff object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overloads Overridable Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
                SerializerXml.Serialize(xmlWriter, Me)
                memoryStream.Seek(0, SeekOrigin.Begin)
                streamReader = New System.IO.StreamReader(memoryStream, encoding)
                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
        
        Public Overloads Overridable Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function
        
        ''' <summary>
        ''' Deserializes FCFCDFBodyGoodsItemDocumentWriteOff object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemDocumentWriteOff 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 FCFCDFBodyGoodsItemDocumentWriteOff, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemDocumentWriteOff)
            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 FCFCDFBodyGoodsItemDocumentWriteOff) 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 FCFCDFBodyGoodsItemDocumentWriteOff
            Dim stringReader As System.IO.StringReader = Nothing
            Try 
                stringReader = New System.IO.StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)),FCFCDFBodyGoodsItemDocumentWriteOff)
            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 FCFCDFBodyGoodsItemDocumentWriteOff
            Return CType(SerializerXml.Deserialize(s),FCFCDFBodyGoodsItemDocumentWriteOff)
        End Function
        #End Region
        
        ''' <summary>
        ''' Serializes current FCFCDFBodyGoodsItemDocumentWriteOff 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 Overloads Overridable Function SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try 
                SaveToFile(fileName, encoding)
                Return true
            Catch e As System.Exception
                exception = e
                Return false
            End Try
        End Function
        
        Public Overloads Overridable Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub
        
        Public Overloads Overridable Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As System.IO.StreamWriter = Nothing
            Try 
                Dim dataString As String = Serialize(encoding)
                streamWriter = New System.IO.StreamWriter(fileName, false, encoding)
                streamWriter.WriteLine(dataString)
                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 FCFCDFBodyGoodsItemDocumentWriteOff object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FCFCDFBodyGoodsItemDocumentWriteOff 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, ByVal encoding As System.Text.Encoding, ByRef obj As FCFCDFBodyGoodsItemDocumentWriteOff, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FCFCDFBodyGoodsItemDocumentWriteOff)
            Try 
                obj = LoadFromFile(fileName, encoding)
                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 FCFCDFBodyGoodsItemDocumentWriteOff, ByRef exception As System.Exception) As Boolean
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8, obj, exception)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FCFCDFBodyGoodsItemDocumentWriteOff) 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 FCFCDFBodyGoodsItemDocumentWriteOff
            Return LoadFromFile(fileName, System.Text.Encoding.UTF8)
        End Function
        
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding) As FCFCDFBodyGoodsItemDocumentWriteOff
            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, encoding)
                Dim dataString As String = sr.ReadToEnd
                sr.Close
                file.Close
                Return Deserialize(dataString)
            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
#Enable Warning
