'' ------------------------------------------------------------------------------
''  <auto-generated>
''    Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com
''    {"TargetFramework":"Net48","NameSpace":"CC328A_v10_0","Language":"VisualBasic","Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{"Formating":true},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}}
''  </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 CC328A_v10_0

    <System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code"),
     XmlType([Namespace]:="http://ics.dgtaxud.ec/CC328A"),
     XmlRoot("CC328A", [Namespace]:="http://ics.dgtaxud.ec/CC328A", IsNullable:=False)>
    Partial Public Class CC328AType

#Region "Private fields"
        Private _mesSenMES3 As String

        Private _mesRecMES6 As String

        Private _datOfPreMES9 As String

        Private _timOfPreMES10 As String

        Private _priMES15 As String

        Private _tesIndMES18 As Flag

        Private _mesIdeMES19 As String

        Private _mesTypMES20 As MessageTypes

        Private _corIdeMES25 As String

        Private _hEAHEA As HEAHEAType

        Private _gOOITEGDS As List(Of GOOITEGDSType)

        Private _cUSOFFLON As CUSOFFLONType

        Private _pERLODSUMDEC As PERLODSUMDECType

        Private _cUSOFFFENT730 As CUSOFFFENT730Type

        Private _tRACARENT601 As TRACARENT601Type

        Private Shared _serializerXml As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New
            Me._tRACARENT601 = New TRACARENT601Type()
            Me._cUSOFFFENT730 = New CUSOFFFENT730Type()
            Me._pERLODSUMDEC = New PERLODSUMDECType()
            Me._cUSOFFLON = New CUSOFFLONType()
            Me._gOOITEGDS = New List(Of GOOITEGDSType)()
            Me._hEAHEA = New HEAHEAType()
        End Sub

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property MesSenMES3() As String
            Get
                Return Me._mesSenMES3
            End Get
            Set
                Me._mesSenMES3 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property MesRecMES6() As String
            Get
                Return Me._mesRecMES6
            End Get
            Set
                Me._mesRecMES6 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property DatOfPreMES9() As String
            Get
                Return Me._datOfPreMES9
            End Get
            Set
                Me._datOfPreMES9 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property TimOfPreMES10() As String
            Get
                Return Me._timOfPreMES10
            End Get
            Set
                Me._timOfPreMES10 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property PriMES15() As String
            Get
                Return Me._priMES15
            End Get
            Set
                Me._priMES15 = Value
            End Set
        End Property

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property TesIndMES18() As Flag
            Get
                Return Me._tesIndMES18
            End Get
            Set
                Me._tesIndMES18 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property MesIdeMES19() As String
            Get
                Return Me._mesIdeMES19
            End Get
            Set
                Me._mesIdeMES19 = Value
            End Set
        End Property

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property MesTypMES20() As MessageTypes
            Get
                Return Me._mesTypMES20
            End Get
            Set
                Me._mesTypMES20 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property CorIdeMES25() As String
            Get
                Return Me._corIdeMES25
            End Get
            Set
                Me._corIdeMES25 = Value
            End Set
        End Property

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property HEAHEA() As HEAHEAType
            Get
                Return Me._hEAHEA
            End Get
            Set
                Me._hEAHEA = Value
            End Set
        End Property

        <XmlElement("GOOITEGDS", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property GOOITEGDS() As List(Of GOOITEGDSType)
            Get
                Return Me._gOOITEGDS
            End Get
            Set
                Me._gOOITEGDS = Value
            End Set
        End Property

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property CUSOFFLON() As CUSOFFLONType
            Get
                Return Me._cUSOFFLON
            End Get
            Set
                Me._cUSOFFLON = Value
            End Set
        End Property

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property PERLODSUMDEC() As PERLODSUMDECType
            Get
                Return Me._pERLODSUMDEC
            End Get
            Set
                Me._pERLODSUMDEC = Value
            End Set
        End Property

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property CUSOFFFENT730() As CUSOFFFENT730Type
            Get
                Return Me._cUSOFFFENT730
            End Get
            Set
                Me._cUSOFFFENT730 = Value
            End Set
        End Property

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property TRACARENT601() As TRACARENT601Type
            Get
                Return Me._tRACARENT601
            End Get
            Set
                Me._tRACARENT601 = Value
            End Set
        End Property

        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CC328AType))
                End If
                Return _serializerXml
            End Get
        End Property

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

        ''' <summary>
        ''' Deserializes CC328AType object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output CC328AType object</param>
        ''' <param name="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 CC328AType, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, CC328AType)
            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 CC328AType) 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 CC328AType
            Dim stringReader As StringReader = Nothing
            Try
                stringReader = New StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CC328AType)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As Stream) As CC328AType
            Return CType(SerializerXml.Deserialize(s), CC328AType)
        End Function
#End Region

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

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize()
                Dim outputFile As FileInfo = New FileInfo(fileName)
                streamWriter = outputFile.CreateText
                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 CC328AType object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output CC328AType object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CC328AType, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, CC328AType)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CC328AType) 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 CC328AType
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New StreamReader(file)
                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.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     XmlType([Namespace]:="http://ics.dgtaxud.ec/tcl")>
    Public Enum Flag

        <XmlEnum("0")>
        Item0

        <XmlEnum("1")>
        Item1
    End Enum

    <System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     XmlType([Namespace]:="http://ics.dgtaxud.ec/tcl")>
    Public Enum MessageTypes

        CC304A

        CC305A

        CC313A

        CC315A

        CC316A

        CC323A

        CC324A

        CC325A

        CC328A

        CC351A

        CD030C

        CD031C

        CD032C

        CD070B

        CD071B

        CD301A

        CD302A

        CD303A

        CD319A

        CD411C

        CD412C

        CD906B

        CD912B

        CD913B

        CD914B

        CD916B

        CD917B

        CD931C

        CD932C

        CD971B
    End Enum

    <System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code"),
     XmlType([Namespace]:="http://ics.dgtaxud.ec/CC328A")>
    Partial Public Class HEAHEAType

#Region "Private fields"
        Private _refNumHEA4 As String

        Private _docNumHEA5 As String

        Private _traModAtBorHEA76 As String

        Private _natHEA001 As String

        Private _ideOfMeaOfTraCroHEA85 As String

        Private _ideOfMeaOfTraCroHEA85LNG As String

        Private _comRefNumHEA As String

        Private _conRefNumHEA As String

        Private _decRegDatTimHEA115 As String

        Private Shared _serializerXml As XmlSerializer
#End Region

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property RefNumHEA4() As String
            Get
                Return Me._refNumHEA4
            End Get
            Set
                Me._refNumHEA4 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property DocNumHEA5() As String
            Get
                Return Me._docNumHEA5
            End Get
            Set
                Me._docNumHEA5 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property TraModAtBorHEA76() As String
            Get
                Return Me._traModAtBorHEA76
            End Get
            Set
                Me._traModAtBorHEA76 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property NatHEA001() As String
            Get
                Return Me._natHEA001
            End Get
            Set
                Me._natHEA001 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property IdeOfMeaOfTraCroHEA85() As String
            Get
                Return Me._ideOfMeaOfTraCroHEA85
            End Get
            Set
                Me._ideOfMeaOfTraCroHEA85 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property IdeOfMeaOfTraCroHEA85LNG() As String
            Get
                Return Me._ideOfMeaOfTraCroHEA85LNG
            End Get
            Set
                Me._ideOfMeaOfTraCroHEA85LNG = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property ComRefNumHEA() As String
            Get
                Return Me._comRefNumHEA
            End Get
            Set
                Me._comRefNumHEA = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property ConRefNumHEA() As String
            Get
                Return Me._conRefNumHEA
            End Get
            Set
                Me._conRefNumHEA = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property DecRegDatTimHEA115() As String
            Get
                Return Me._decRegDatTimHEA115
            End Get
            Set
                Me._decRegDatTimHEA115 = Value
            End Set
        End Property

        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(HEAHEAType))
                End If
                Return _serializerXml
            End Get
        End Property

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

        ''' <summary>
        ''' Deserializes HEAHEAType object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output HEAHEAType object</param>
        ''' <param name="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 HEAHEAType, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, HEAHEAType)
            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 HEAHEAType) 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 HEAHEAType
            Dim stringReader As StringReader = Nothing
            Try
                stringReader = New StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), HEAHEAType)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As Stream) As HEAHEAType
            Return CType(SerializerXml.Deserialize(s), HEAHEAType)
        End Function
#End Region

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

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize()
                Dim outputFile As FileInfo = New FileInfo(fileName)
                streamWriter = outputFile.CreateText
                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 HEAHEAType object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output HEAHEAType object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HEAHEAType, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, HEAHEAType)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HEAHEAType) 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 HEAHEAType
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New StreamReader(file)
                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.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code"),
     XmlType([Namespace]:="http://ics.dgtaxud.ec/CC328A")>
    Partial Public Class TRACARENT601Type

#Region "Private fields"
        Private _namTRACARENT604 As String

        Private _strNumTRACARENT607 As String

        Private _pstCodTRACARENT606 As String

        Private _ctyTRACARENT603 As String

        Private _couCodTRACARENT605 As String

        Private _tRACARENT601LNG As String

        Private _tINTRACARENT602 As String

        Private Shared _serializerXml As XmlSerializer
#End Region

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property NamTRACARENT604() As String
            Get
                Return Me._namTRACARENT604
            End Get
            Set
                Me._namTRACARENT604 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property StrNumTRACARENT607() As String
            Get
                Return Me._strNumTRACARENT607
            End Get
            Set
                Me._strNumTRACARENT607 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property PstCodTRACARENT606() As String
            Get
                Return Me._pstCodTRACARENT606
            End Get
            Set
                Me._pstCodTRACARENT606 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property CtyTRACARENT603() As String
            Get
                Return Me._ctyTRACARENT603
            End Get
            Set
                Me._ctyTRACARENT603 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property CouCodTRACARENT605() As String
            Get
                Return Me._couCodTRACARENT605
            End Get
            Set
                Me._couCodTRACARENT605 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property TRACARENT601LNG() As String
            Get
                Return Me._tRACARENT601LNG
            End Get
            Set
                Me._tRACARENT601LNG = Value
            End Set
        End Property

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property TINTRACARENT602() As String
            Get
                Return Me._tINTRACARENT602
            End Get
            Set
                Me._tINTRACARENT602 = Value
            End Set
        End Property

        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TRACARENT601Type))
                End If
                Return _serializerXml
            End Get
        End Property

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

        ''' <summary>
        ''' Deserializes TRACARENT601Type object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output TRACARENT601Type object</param>
        ''' <param name="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 TRACARENT601Type, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, TRACARENT601Type)
            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 TRACARENT601Type) 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 TRACARENT601Type
            Dim stringReader As StringReader = Nothing
            Try
                stringReader = New StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TRACARENT601Type)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As Stream) As TRACARENT601Type
            Return CType(SerializerXml.Deserialize(s), TRACARENT601Type)
        End Function
#End Region

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

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize()
                Dim outputFile As FileInfo = New FileInfo(fileName)
                streamWriter = outputFile.CreateText
                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 TRACARENT601Type object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output TRACARENT601Type object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TRACARENT601Type, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, TRACARENT601Type)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TRACARENT601Type) 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 TRACARENT601Type
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New StreamReader(file)
                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.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code"),
     XmlType([Namespace]:="http://ics.dgtaxud.ec/CC328A")>
    Partial Public Class CUSOFFFENT730Type

#Region "Private fields"
        Private _refNumCUSOFFFENT731 As String

        Private _expDatOfArrFIRENT733 As String

        Private Shared _serializerXml As XmlSerializer
#End Region

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property RefNumCUSOFFFENT731() As String
            Get
                Return Me._refNumCUSOFFFENT731
            End Get
            Set
                Me._refNumCUSOFFFENT731 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property ExpDatOfArrFIRENT733() As String
            Get
                Return Me._expDatOfArrFIRENT733
            End Get
            Set
                Me._expDatOfArrFIRENT733 = Value
            End Set
        End Property

        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CUSOFFFENT730Type))
                End If
                Return _serializerXml
            End Get
        End Property

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

        ''' <summary>
        ''' Deserializes CUSOFFFENT730Type object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output CUSOFFFENT730Type object</param>
        ''' <param name="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 CUSOFFFENT730Type, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, CUSOFFFENT730Type)
            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 CUSOFFFENT730Type) 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 CUSOFFFENT730Type
            Dim stringReader As StringReader = Nothing
            Try
                stringReader = New StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CUSOFFFENT730Type)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As Stream) As CUSOFFFENT730Type
            Return CType(SerializerXml.Deserialize(s), CUSOFFFENT730Type)
        End Function
#End Region

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

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize()
                Dim outputFile As FileInfo = New FileInfo(fileName)
                streamWriter = outputFile.CreateText
                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 CUSOFFFENT730Type object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output CUSOFFFENT730Type object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CUSOFFFENT730Type, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, CUSOFFFENT730Type)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CUSOFFFENT730Type) 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 CUSOFFFENT730Type
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New StreamReader(file)
                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.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code"),
     XmlType([Namespace]:="http://ics.dgtaxud.ec/CC328A")>
    Partial Public Class PERLODSUMDECType

#Region "Private fields"
        Private _namPLD1 As String

        Private _strAndNumPLD1 As String

        Private _posCodPLD1 As String

        Private _citPLD1 As String

        Private _couCodPLD1 As String

        Private _pERLODSUMDECLNG As String

        Private _tINPLD1 As String

        Private Shared _serializerXml As XmlSerializer
#End Region

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property NamPLD1() As String
            Get
                Return Me._namPLD1
            End Get
            Set
                Me._namPLD1 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property StrAndNumPLD1() As String
            Get
                Return Me._strAndNumPLD1
            End Get
            Set
                Me._strAndNumPLD1 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property PosCodPLD1() As String
            Get
                Return Me._posCodPLD1
            End Get
            Set
                Me._posCodPLD1 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property CitPLD1() As String
            Get
                Return Me._citPLD1
            End Get
            Set
                Me._citPLD1 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property CouCodPLD1() As String
            Get
                Return Me._couCodPLD1
            End Get
            Set
                Me._couCodPLD1 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property PERLODSUMDECLNG() As String
            Get
                Return Me._pERLODSUMDECLNG
            End Get
            Set
                Me._pERLODSUMDECLNG = Value
            End Set
        End Property

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property TINPLD1() As String
            Get
                Return Me._tINPLD1
            End Get
            Set
                Me._tINPLD1 = Value
            End Set
        End Property

        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PERLODSUMDECType))
                End If
                Return _serializerXml
            End Get
        End Property

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

        ''' <summary>
        ''' Deserializes PERLODSUMDECType object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output PERLODSUMDECType object</param>
        ''' <param name="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 PERLODSUMDECType, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, PERLODSUMDECType)
            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 PERLODSUMDECType) 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 PERLODSUMDECType
            Dim stringReader As StringReader = Nothing
            Try
                stringReader = New StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PERLODSUMDECType)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As Stream) As PERLODSUMDECType
            Return CType(SerializerXml.Deserialize(s), PERLODSUMDECType)
        End Function
#End Region

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

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize()
                Dim outputFile As FileInfo = New FileInfo(fileName)
                streamWriter = outputFile.CreateText
                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 PERLODSUMDECType object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output PERLODSUMDECType object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PERLODSUMDECType, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, PERLODSUMDECType)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PERLODSUMDECType) 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 PERLODSUMDECType
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New StreamReader(file)
                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.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code"),
     XmlType([Namespace]:="http://ics.dgtaxud.ec/CC328A")>
    Partial Public Class CUSOFFLONType

#Region "Private fields"
        Private _refNumCOL1 As String

        Private Shared _serializerXml As XmlSerializer
#End Region

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property RefNumCOL1() As String
            Get
                Return Me._refNumCOL1
            End Get
            Set
                Me._refNumCOL1 = Value
            End Set
        End Property

        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CUSOFFLONType))
                End If
                Return _serializerXml
            End Get
        End Property

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

        ''' <summary>
        ''' Deserializes CUSOFFLONType object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output CUSOFFLONType object</param>
        ''' <param name="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 CUSOFFLONType, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, CUSOFFLONType)
            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 CUSOFFLONType) 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 CUSOFFLONType
            Dim stringReader As StringReader = Nothing
            Try
                stringReader = New StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CUSOFFLONType)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As Stream) As CUSOFFLONType
            Return CType(SerializerXml.Deserialize(s), CUSOFFLONType)
        End Function
#End Region

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

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize()
                Dim outputFile As FileInfo = New FileInfo(fileName)
                streamWriter = outputFile.CreateText
                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 CUSOFFLONType object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output CUSOFFLONType object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CUSOFFLONType, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, CUSOFFLONType)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CUSOFFLONType) 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 CUSOFFLONType
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New StreamReader(file)
                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.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code"),
     XmlType([Namespace]:="http://ics.dgtaxud.ec/CC328A")>
    Partial Public Class IDEMEATRAGI970Type

#Region "Private fields"
        Private _natIDEMEATRAGI973 As String

        Private _ideMeaTraGIMEATRA971 As String

        Private _ideMeaTraGIMEATRA972LNG As String

        Private Shared _serializerXml As XmlSerializer
#End Region

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property NatIDEMEATRAGI973() As String
            Get
                Return Me._natIDEMEATRAGI973
            End Get
            Set
                Me._natIDEMEATRAGI973 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property IdeMeaTraGIMEATRA971() As String
            Get
                Return Me._ideMeaTraGIMEATRA971
            End Get
            Set
                Me._ideMeaTraGIMEATRA971 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property IdeMeaTraGIMEATRA972LNG() As String
            Get
                Return Me._ideMeaTraGIMEATRA972LNG
            End Get
            Set
                Me._ideMeaTraGIMEATRA972LNG = Value
            End Set
        End Property

        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(IDEMEATRAGI970Type))
                End If
                Return _serializerXml
            End Get
        End Property

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

        ''' <summary>
        ''' Deserializes IDEMEATRAGI970Type object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output IDEMEATRAGI970Type object</param>
        ''' <param name="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 IDEMEATRAGI970Type, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, IDEMEATRAGI970Type)
            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 IDEMEATRAGI970Type) 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 IDEMEATRAGI970Type
            Dim stringReader As StringReader = Nothing
            Try
                stringReader = New StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), IDEMEATRAGI970Type)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As Stream) As IDEMEATRAGI970Type
            Return CType(SerializerXml.Deserialize(s), IDEMEATRAGI970Type)
        End Function
#End Region

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

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize()
                Dim outputFile As FileInfo = New FileInfo(fileName)
                streamWriter = outputFile.CreateText
                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 IDEMEATRAGI970Type object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output IDEMEATRAGI970Type object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As IDEMEATRAGI970Type, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, IDEMEATRAGI970Type)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As IDEMEATRAGI970Type) 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 IDEMEATRAGI970Type
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New StreamReader(file)
                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.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code"),
     XmlType([Namespace]:="http://ics.dgtaxud.ec/CC328A")>
    Partial Public Class CONNR2Type

#Region "Private fields"
        Private _conNumNR21 As String

        Private Shared _serializerXml As XmlSerializer
#End Region

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property ConNumNR21() As String
            Get
                Return Me._conNumNR21
            End Get
            Set
                Me._conNumNR21 = Value
            End Set
        End Property

        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CONNR2Type))
                End If
                Return _serializerXml
            End Get
        End Property

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

        ''' <summary>
        ''' Deserializes CONNR2Type object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output CONNR2Type object</param>
        ''' <param name="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 CONNR2Type, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, CONNR2Type)
            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 CONNR2Type) 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 CONNR2Type
            Dim stringReader As StringReader = Nothing
            Try
                stringReader = New StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CONNR2Type)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As Stream) As CONNR2Type
            Return CType(SerializerXml.Deserialize(s), CONNR2Type)
        End Function
#End Region

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

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize()
                Dim outputFile As FileInfo = New FileInfo(fileName)
                streamWriter = outputFile.CreateText
                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 CONNR2Type object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output CONNR2Type object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CONNR2Type, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, CONNR2Type)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CONNR2Type) 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 CONNR2Type
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New StreamReader(file)
                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.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code"),
     XmlType([Namespace]:="http://ics.dgtaxud.ec/CC328A")>
    Partial Public Class PRODOCDC2Type

#Region "Private fields"
        Private _docTypDC21 As String

        Private _docRefDC23 As String

        Private _docRefDCLNG As String

        Private Shared _serializerXml As XmlSerializer
#End Region

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property DocTypDC21() As String
            Get
                Return Me._docTypDC21
            End Get
            Set
                Me._docTypDC21 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property DocRefDC23() As String
            Get
                Return Me._docRefDC23
            End Get
            Set
                Me._docRefDC23 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property DocRefDCLNG() As String
            Get
                Return Me._docRefDCLNG
            End Get
            Set
                Me._docRefDCLNG = Value
            End Set
        End Property

        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PRODOCDC2Type))
                End If
                Return _serializerXml
            End Get
        End Property

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

        ''' <summary>
        ''' Deserializes PRODOCDC2Type object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output PRODOCDC2Type object</param>
        ''' <param name="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 PRODOCDC2Type, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, PRODOCDC2Type)
            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 PRODOCDC2Type) 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 PRODOCDC2Type
            Dim stringReader As StringReader = Nothing
            Try
                stringReader = New StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PRODOCDC2Type)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As Stream) As PRODOCDC2Type
            Return CType(SerializerXml.Deserialize(s), PRODOCDC2Type)
        End Function
#End Region

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

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize()
                Dim outputFile As FileInfo = New FileInfo(fileName)
                streamWriter = outputFile.CreateText
                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 PRODOCDC2Type object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output PRODOCDC2Type object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PRODOCDC2Type, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, PRODOCDC2Type)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PRODOCDC2Type) 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 PRODOCDC2Type
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New StreamReader(file)
                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.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code"),
     XmlType([Namespace]:="http://ics.dgtaxud.ec/CC328A")>
    Partial Public Class GOOITEGDSType

#Region "Private fields"
        Private _iteNumGDS7 As String

        Private _comRefNumGIM1 As String

        Private _pRODOCDC2 As List(Of PRODOCDC2Type)

        Private _cONNR2 As List(Of CONNR2Type)

        Private _iDEMEATRAGI970 As List(Of IDEMEATRAGI970Type)

        Private Shared _serializerXml As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New
            Me._iDEMEATRAGI970 = New List(Of IDEMEATRAGI970Type)()
            Me._cONNR2 = New List(Of CONNR2Type)()
            Me._pRODOCDC2 = New List(Of PRODOCDC2Type)()
        End Sub

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property IteNumGDS7() As String
            Get
                Return Me._iteNumGDS7
            End Get
            Set
                Me._iteNumGDS7 = Value
            End Set
        End Property

       <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, DataType:="token")>
        Public Property ComRefNumGIM1() As String
            Get
                Return Me._comRefNumGIM1
            End Get
            Set
                Me._comRefNumGIM1 = Value
            End Set
        End Property

        <XmlElement("PRODOCDC2", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property PRODOCDC2() As List(Of PRODOCDC2Type)
            Get
                Return Me._pRODOCDC2
            End Get
            Set
                Me._pRODOCDC2 = Value
            End Set
        End Property

        <XmlElement("CONNR2", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property CONNR2() As List(Of CONNR2Type)
            Get
                Return Me._cONNR2
            End Get
            Set
                Me._cONNR2 = Value
            End Set
        End Property

        <XmlElement("IDEMEATRAGI970", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property IDEMEATRAGI970() As List(Of IDEMEATRAGI970Type)
            Get
                Return Me._iDEMEATRAGI970
            End Get
            Set
                Me._iDEMEATRAGI970 = Value
            End Set
        End Property

        Private Shared ReadOnly Property SerializerXml() As XmlSerializer
            Get
                If (_serializerXml Is Nothing) Then
                    _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(GOOITEGDSType))
                End If
                Return _serializerXml
            End Get
        End Property

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

        ''' <summary>
        ''' Deserializes GOOITEGDSType object
        ''' </summary>
        ''' <param name="input">string to deserialize</param>
        ''' <param name="obj">Output GOOITEGDSType object</param>
        ''' <param name="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 GOOITEGDSType, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, GOOITEGDSType)
            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 GOOITEGDSType) 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 GOOITEGDSType
            Dim stringReader As StringReader = Nothing
            Try
                stringReader = New StringReader(input)
                Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GOOITEGDSType)
            Finally
                If (Not (stringReader) Is Nothing) Then
                    stringReader.Dispose()
                End If
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal s As Stream) As GOOITEGDSType
            Return CType(SerializerXml.Deserialize(s), GOOITEGDSType)
        End Function
#End Region

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

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize()
                Dim outputFile As FileInfo = New FileInfo(fileName)
                streamWriter = outputFile.CreateText
                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 GOOITEGDSType object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output GOOITEGDSType object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GOOITEGDSType, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, GOOITEGDSType)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GOOITEGDSType) 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 GOOITEGDSType
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New StreamReader(file)
                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
