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

    <System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code"),
     XmlRoot("UngueltigkeitSicherheitenNCTSDE", [Namespace]:="", IsNullable:=False)>
    Partial Public Class UngueltigkeitSicherheitenMITyp
        Inherits DatenaustauschNCTSTyp

#Region "Private fields"
        Private _einzelUngueltigkeitSicherheiten As EinzelUngueltigkeitSicherheitenTyp

        Private Shared _serializerXml As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New
            Me._einzelUngueltigkeitSicherheiten = New EinzelUngueltigkeitSicherheitenTyp()
        End Sub

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property EinzelUngueltigkeitSicherheiten() As EinzelUngueltigkeitSicherheitenTyp
            Get
                Return Me._einzelUngueltigkeitSicherheiten
            End Get
            Set
                Me._einzelUngueltigkeitSicherheiten = Value
            End Set
        End Property

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

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize UngueltigkeitSicherheitenMITyp object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overridable Overloads Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                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, 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 Overridable Overloads Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function

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

        ''' <summary>
        ''' Serializes current UngueltigkeitSicherheitenMITyp 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, 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 Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize(encoding)
                streamWriter = New 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 UngueltigkeitSicherheitenMITyp object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output UngueltigkeitSicherheitenMITyp object</param>
        ''' <param name="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 UngueltigkeitSicherheitenMITyp, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, UngueltigkeitSicherheitenMITyp)
            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 UngueltigkeitSicherheitenMITyp, 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 UngueltigkeitSicherheitenMITyp) 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 UngueltigkeitSicherheitenMITyp
            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 UngueltigkeitSicherheitenMITyp
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New 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.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code")>
    Partial Public Class EinzelUngueltigkeitSicherheitenTyp

#Region "Private fields"
        Private _objektIdentifizierung As ObjektIdentifizierungMITyp

        Private _kopfDaten As KopfDatenUngueltigkeitSicherheitenTyp

        Private _transitOperation As TransitOperationMIType

        Private Shared _serializerXml As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New
            Me._transitOperation = New TransitOperationMIType()
            Me._kopfDaten = New KopfDatenUngueltigkeitSicherheitenTyp()
            Me._objektIdentifizierung = New ObjektIdentifizierungMITyp()
        End Sub

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property ObjektIdentifizierung() As ObjektIdentifizierungMITyp
            Get
                Return Me._objektIdentifizierung
            End Get
            Set
                Me._objektIdentifizierung = Value
            End Set
        End Property

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property KopfDaten() As KopfDatenUngueltigkeitSicherheitenTyp
            Get
                Return Me._kopfDaten
            End Get
            Set
                Me._kopfDaten = Value
            End Set
        End Property

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property TransitOperation() As TransitOperationMIType
            Get
                Return Me._transitOperation
            End Get
            Set
                Me._transitOperation = Value
            End Set
        End Property

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

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize EinzelUngueltigkeitSicherheitenTyp object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overridable Overloads Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                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, 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 Overridable Overloads Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function

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

        ''' <summary>
        ''' Serializes current EinzelUngueltigkeitSicherheitenTyp 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, 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 Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize(encoding)
                streamWriter = New 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 EinzelUngueltigkeitSicherheitenTyp object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output EinzelUngueltigkeitSicherheitenTyp object</param>
        ''' <param name="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 EinzelUngueltigkeitSicherheitenTyp, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, EinzelUngueltigkeitSicherheitenTyp)
            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 EinzelUngueltigkeitSicherheitenTyp, 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 EinzelUngueltigkeitSicherheitenTyp) 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 EinzelUngueltigkeitSicherheitenTyp
            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 EinzelUngueltigkeitSicherheitenTyp
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New 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.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code")>
    Partial Public Class ObjektIdentifizierungMITyp

#Region "Private fields"
        Private _objektName As String

        Private _objektAlias As String

        Private _eDIFACTNachrichtenNr As String

        Private _zeitpunktEingang As Date

        Private _shipmentReferenz As String

        Private Shared _serializerXml As XmlSerializer
#End Region

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

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

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

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property ZeitpunktEingang() As Date
            Get
                Return Me._zeitpunktEingang
            End Get
            Set
                Me._zeitpunktEingang = Value
            End Set
        End Property

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

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

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize ObjektIdentifizierungMITyp object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overridable Overloads Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                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, 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 Overridable Overloads Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function

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

        ''' <summary>
        ''' Serializes current ObjektIdentifizierungMITyp 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, 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 Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize(encoding)
                streamWriter = New 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 ObjektIdentifizierungMITyp object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output ObjektIdentifizierungMITyp object</param>
        ''' <param name="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 ObjektIdentifizierungMITyp, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, ObjektIdentifizierungMITyp)
            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 ObjektIdentifizierungMITyp, 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 ObjektIdentifizierungMITyp) 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 ObjektIdentifizierungMITyp
            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 ObjektIdentifizierungMITyp
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New 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.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code")>
    Partial Public Class ApplicationInternalDataAdditionalDetailsDataType

#Region "Private fields"
        Private _key As String

        Private _value As String

        Private Shared _serializerXml As XmlSerializer
#End Region

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

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property Value() As String
            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(ApplicationInternalDataAdditionalDetailsDataType))
                End If
                Return _serializerXml
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize ApplicationInternalDataAdditionalDetailsDataType object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overridable Overloads Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                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, 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 Overridable Overloads Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function

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

        ''' <summary>
        ''' Serializes current ApplicationInternalDataAdditionalDetailsDataType 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, 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 Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize(encoding)
                streamWriter = New 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 ApplicationInternalDataAdditionalDetailsDataType object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output ApplicationInternalDataAdditionalDetailsDataType object</param>
        ''' <param name="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 ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType)
            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 ApplicationInternalDataAdditionalDetailsDataType, 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 ApplicationInternalDataAdditionalDetailsDataType) 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 ApplicationInternalDataAdditionalDetailsDataType
            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 ApplicationInternalDataAdditionalDetailsDataType
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New 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.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code")>
    Partial Public Class ApplicationInternalDataType

#Region "Private fields"
        Private _additionalDetails As List(Of ApplicationInternalDataAdditionalDetailsDataType)

        Private Shared _serializerXml As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New
            Me._additionalDetails = New List(Of ApplicationInternalDataAdditionalDetailsDataType)()
        End Sub

        <XmlArray(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified),
         XmlArrayItem("Data", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable:=False)>
        Public Property AdditionalDetails() As List(Of ApplicationInternalDataAdditionalDetailsDataType)
            Get
                Return Me._additionalDetails
            End Get
            Set
                Me._additionalDetails = Value
            End Set
        End Property

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

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize ApplicationInternalDataType object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overridable Overloads Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                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, 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 Overridable Overloads Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function

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

        ''' <summary>
        ''' Serializes current ApplicationInternalDataType 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, 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 Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize(encoding)
                streamWriter = New 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 ApplicationInternalDataType object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output ApplicationInternalDataType object</param>
        ''' <param name="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 ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, ApplicationInternalDataType)
            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 ApplicationInternalDataType, 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 ApplicationInternalDataType) 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 ApplicationInternalDataType
            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 ApplicationInternalDataType
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New 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.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code")>
    Partial Public Class ErrorMIType

#Region "Private fields"
        Private _errorCode As String

        Private _errorText As String

        Private _errorPointer As String

        Private _originalAttributeValue As String

        Private Shared _serializerXml As XmlSerializer
#End Region

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

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

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

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

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

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize ErrorMIType object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overridable Overloads Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                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, 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 Overridable Overloads Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function

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

        ''' <summary>
        ''' Serializes current ErrorMIType 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, 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 Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize(encoding)
                streamWriter = New 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 ErrorMIType object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output ErrorMIType object</param>
        ''' <param name="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 ErrorMIType, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, ErrorMIType)
            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 ErrorMIType, 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 ErrorMIType) 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 ErrorMIType
            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 ErrorMIType
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New 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.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code")>
    Partial Public Class RepresentativeMIType

#Region "Private fields"
        Private _identificationNumber As String

        Private Shared _serializerXml As XmlSerializer
#End Region

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        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(RepresentativeMIType))
                End If
                Return _serializerXml
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize RepresentativeMIType object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overridable Overloads Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                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, 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 Overridable Overloads Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function

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

        ''' <summary>
        ''' Serializes current RepresentativeMIType 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, 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 Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize(encoding)
                streamWriter = New 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 RepresentativeMIType object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output RepresentativeMIType object</param>
        ''' <param name="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 RepresentativeMIType, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, RepresentativeMIType)
            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 RepresentativeMIType, 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 RepresentativeMIType) 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 RepresentativeMIType
            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 RepresentativeMIType
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New 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.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code")>
    Partial Public Class HolderOfTheTransitProcedureMIType

#Region "Private fields"
        Private _identificationNumber As String

        Private _name As String

        Private _streetAndNumber As String

        Private _city As String

        Private _postcode As String

        Private _country As String

        Private Shared _serializerXml As XmlSerializer
#End Region

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

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

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

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

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

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

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

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize HolderOfTheTransitProcedureMIType object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overridable Overloads Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                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, 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 Overridable Overloads Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function

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

        ''' <summary>
        ''' Serializes current HolderOfTheTransitProcedureMIType 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, 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 Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize(encoding)
                streamWriter = New 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 HolderOfTheTransitProcedureMIType object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output HolderOfTheTransitProcedureMIType object</param>
        ''' <param name="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 HolderOfTheTransitProcedureMIType, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, HolderOfTheTransitProcedureMIType)
            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 HolderOfTheTransitProcedureMIType, 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 HolderOfTheTransitProcedureMIType) 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 HolderOfTheTransitProcedureMIType
            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 HolderOfTheTransitProcedureMIType
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New 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.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code")>
    Partial Public Class TransitOperationMIType

#Region "Private fields"
        Private _departureStatus As String

        Private _rejectionCode As String

        Private _mRN As String

        Private _cancellationDecisionDateAndTime As Date

        Private _customsOfficeOfDeparture As String

        Private _holderOfTheTransitProcedure As HolderOfTheTransitProcedureMIType

        Private _representative As RepresentativeMIType

        Private _reason As String

        Private _error As List(Of ErrorMIType)

        Private _applicationInternalData As ApplicationInternalDataType

        Private Shared _serializerXml As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New
            Me._applicationInternalData = New ApplicationInternalDataType()
            Me._error = New List(Of ErrorMIType)()
            Me._representative = New RepresentativeMIType()
            Me._holderOfTheTransitProcedure = New HolderOfTheTransitProcedureMIType()
        End Sub

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

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

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

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property CancellationDecisionDateAndTime() As Date
            Get
                Return Me._cancellationDecisionDateAndTime
            End Get
            Set
                Me._cancellationDecisionDateAndTime = Value
            End Set
        End Property

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

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property HolderOfTheTransitProcedure() As HolderOfTheTransitProcedureMIType
            Get
                Return Me._holderOfTheTransitProcedure
            End Get
            Set
                Me._holderOfTheTransitProcedure = Value
            End Set
        End Property

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property Representative() As RepresentativeMIType
            Get
                Return Me._representative
            End Get
            Set
                Me._representative = Value
            End Set
        End Property

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

        <XmlElement("Error", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property [Error]() As List(Of ErrorMIType)
            Get
                Return Me._error
            End Get
            Set
                Me._error = Value
            End Set
        End Property

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property ApplicationInternalData() As ApplicationInternalDataType
            Get
                Return Me._applicationInternalData
            End Get
            Set
                Me._applicationInternalData = Value
            End Set
        End Property

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

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize TransitOperationMIType object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overridable Overloads Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                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, 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 Overridable Overloads Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function

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

        ''' <summary>
        ''' Serializes current TransitOperationMIType 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, 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 Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize(encoding)
                streamWriter = New 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 TransitOperationMIType object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output TransitOperationMIType object</param>
        ''' <param name="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 TransitOperationMIType, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, TransitOperationMIType)
            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 TransitOperationMIType, 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 TransitOperationMIType) 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 TransitOperationMIType
            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 TransitOperationMIType
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New 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.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code")>
    Partial Public Class FehlermeldungMITyp

#Region "Private fields"
        Private _code As String

        Private _text As String

        Private _zeiger As String

        Private Shared _serializerXml As XmlSerializer
#End Region

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

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

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

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

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize FehlermeldungMITyp object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overridable Overloads Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                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, 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 Overridable Overloads Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function

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

        ''' <summary>
        ''' Serializes current FehlermeldungMITyp 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, 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 Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize(encoding)
                streamWriter = New 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 FehlermeldungMITyp object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output FehlermeldungMITyp object</param>
        ''' <param name="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 FehlermeldungMITyp, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, FehlermeldungMITyp)
            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 FehlermeldungMITyp, 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 FehlermeldungMITyp) 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 FehlermeldungMITyp
            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 FehlermeldungMITyp
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New 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.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code")>
    Partial Public Class SicherheitMITyp

#Region "Private fields"
        Private _gRN As String

        Private _codeUngueltigkeit As String

        Private _textUngueltigkeit As String

        Private Shared _serializerXml As XmlSerializer
#End Region

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

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

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

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

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize SicherheitMITyp object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overridable Overloads Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                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, 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 Overridable Overloads Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function

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

        ''' <summary>
        ''' Serializes current SicherheitMITyp 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, 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 Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize(encoding)
                streamWriter = New 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 SicherheitMITyp object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output SicherheitMITyp object</param>
        ''' <param name="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 SicherheitMITyp, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, SicherheitMITyp)
            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 SicherheitMITyp, 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 SicherheitMITyp) 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 SicherheitMITyp
            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 SicherheitMITyp
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New 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.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code")>
    Partial Public Class HauptverpflichteterAnsprechpartnerMITyp

#Region "Private fields"
        Private _sachbearbeiter As String

        Private _stellung As String

        Private _telefonnummer As String

        Private _telefaxnummer As String

        Private _emailAdresse As String

        Private Shared _serializerXml As XmlSerializer
#End Region

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

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

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

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

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

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

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize HauptverpflichteterAnsprechpartnerMITyp object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overridable Overloads Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                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, 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 Overridable Overloads Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function

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

        ''' <summary>
        ''' Serializes current HauptverpflichteterAnsprechpartnerMITyp 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, 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 Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize(encoding)
                streamWriter = New 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 HauptverpflichteterAnsprechpartnerMITyp object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output HauptverpflichteterAnsprechpartnerMITyp object</param>
        ''' <param name="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 HauptverpflichteterAnsprechpartnerMITyp, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, HauptverpflichteterAnsprechpartnerMITyp)
            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 HauptverpflichteterAnsprechpartnerMITyp, 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 HauptverpflichteterAnsprechpartnerMITyp) 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 HauptverpflichteterAnsprechpartnerMITyp
            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 HauptverpflichteterAnsprechpartnerMITyp
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New 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.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code")>
    Partial Public Class KopfDatenUngueltigkeitSicherheitenTyp

#Region "Private fields"
        Private _arbeitsnummer As String

        Private _zeitpunktUngueltigkeitUnwirksamkeit As Date

        Private _hauptverpflichteterEORI As String

        Private _hauptverpflichteterNLNR As String

        Private _hauptverpflichteterIDCarnet As String

        Private _hauptverpflichteterName As String

        Private _hauptverpflichteterStrasseHausnummer As String

        Private _hauptverpflichteterLand As String

        Private _hauptverpflichteterPLZ As String

        Private _hauptverpflichteterOrt As String

        Private _hauptverpflichteterAnsprechpartner As HauptverpflichteterAnsprechpartnerMITyp

        Private _grund As String

        Private _sicherheit As List(Of SicherheitMITyp)

        Private _fehlermeldung As List(Of FehlermeldungMITyp)

        Private Shared _serializerXml As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New
            Me._fehlermeldung = New List(Of FehlermeldungMITyp)()
            Me._sicherheit = New List(Of SicherheitMITyp)()
            Me._hauptverpflichteterAnsprechpartner = New HauptverpflichteterAnsprechpartnerMITyp()
        End Sub

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

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property ZeitpunktUngueltigkeitUnwirksamkeit() As Date
            Get
                Return Me._zeitpunktUngueltigkeitUnwirksamkeit
            End Get
            Set
                Me._zeitpunktUngueltigkeitUnwirksamkeit = Value
            End Set
        End Property

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

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

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

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

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

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

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

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

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property HauptverpflichteterAnsprechpartner() As HauptverpflichteterAnsprechpartnerMITyp
            Get
                Return Me._hauptverpflichteterAnsprechpartner
            End Get
            Set
                Me._hauptverpflichteterAnsprechpartner = Value
            End Set
        End Property

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

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

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

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

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize KopfDatenUngueltigkeitSicherheitenTyp object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overridable Overloads Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                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, 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 Overridable Overloads Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function

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

        ''' <summary>
        ''' Serializes current KopfDatenUngueltigkeitSicherheitenTyp 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, 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 Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize(encoding)
                streamWriter = New 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 KopfDatenUngueltigkeitSicherheitenTyp object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output KopfDatenUngueltigkeitSicherheitenTyp object</param>
        ''' <param name="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 KopfDatenUngueltigkeitSicherheitenTyp, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, KopfDatenUngueltigkeitSicherheitenTyp)
            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 KopfDatenUngueltigkeitSicherheitenTyp, 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 KopfDatenUngueltigkeitSicherheitenTyp) 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 KopfDatenUngueltigkeitSicherheitenTyp
            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 KopfDatenUngueltigkeitSicherheitenTyp
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New 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.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code")>
    Partial Public Class TransaktionNCTSTyp

#Region "Private fields"
        Private _iOPartner As String

        Private _iODivision1 As String

        Private _iODivision2 As String

        Private _iODivision3 As String

        Private _iOReferenz As String

        Private _iODatumZeit As Date

        Private _version As String

        Private Shared _serializerXml As XmlSerializer
#End Region

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

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

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

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

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

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property IODatumZeit() As Date
            Get
                Return Me._iODatumZeit
            End Get
            Set
                Me._iODatumZeit = Value
            End Set
        End Property

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="nonNegativeInteger")>
        Public Property Version() As String
            Get
                Return Me._version
            End Get
            Set
                Me._version = Value
            End Set
        End Property

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

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize TransaktionNCTSTyp object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overridable Overloads Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                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, 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 Overridable Overloads Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function

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

        ''' <summary>
        ''' Serializes current TransaktionNCTSTyp 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, 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 Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize(encoding)
                streamWriter = New 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 TransaktionNCTSTyp object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output TransaktionNCTSTyp object</param>
        ''' <param name="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 TransaktionNCTSTyp, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, TransaktionNCTSTyp)
            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 TransaktionNCTSTyp, 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 TransaktionNCTSTyp) 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 TransaktionNCTSTyp
            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 TransaktionNCTSTyp
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New 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

    <XmlIncludeAttribute(GetType(UngueltigkeitSicherheitenMITyp)),
     System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
     System.Serializable,
     DebuggerStepThrough,
     DesignerCategoryAttribute("code")>
    Partial Public Class DatenaustauschNCTSTyp

#Region "Private fields"
        Private _transaktion As TransaktionNCTSTyp

        Private Shared _serializerXml As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New
            Me._transaktion = New TransaktionNCTSTyp()
        End Sub

        <XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
        Public Property Transaktion() As TransaktionNCTSTyp
            Get
                Return Me._transaktion
            End Get
            Set
                Me._transaktion = Value
            End Set
        End Property

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

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serialize DatenaustauschNCTSTyp object
        ''' </summary>
        ''' <returns>XML value</returns>
        Public Overridable Overloads Function Serialize(ByVal encoding As System.Text.Encoding) 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.Encoding = encoding
                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, 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 Overridable Overloads Function Serialize() As String
            Return Serialize(System.Text.Encoding.UTF8)
        End Function

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

        ''' <summary>
        ''' Serializes current DatenaustauschNCTSTyp 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, 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 Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            Return SaveToFile(fileName, System.Text.Encoding.UTF8, exception)
        End Function

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
            SaveToFile(fileName, System.Text.Encoding.UTF8)
        End Sub

        Public Overridable Overloads Sub SaveToFile(ByVal fileName As String, ByVal encoding As System.Text.Encoding)
            Dim streamWriter As StreamWriter = Nothing
            Try
                Dim dataString As String = Serialize(encoding)
                streamWriter = New 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 DatenaustauschNCTSTyp object
        ''' </summary>
        ''' <param name="fileName">File to load and deserialize</param>
        ''' <param name="obj">Output DatenaustauschNCTSTyp object</param>
        ''' <param name="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 DatenaustauschNCTSTyp, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DatenaustauschNCTSTyp)
            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 DatenaustauschNCTSTyp, 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 DatenaustauschNCTSTyp) 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 DatenaustauschNCTSTyp
            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 DatenaustauschNCTSTyp
            Dim file As FileStream = Nothing
            Dim sr As StreamReader = Nothing
            Try
                file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New 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
