Imports System.Xml
Imports System.Xml.Serialization

Public Structure OWNERLIST
    <XmlElement(ElementName:="OWNERDATA")> Dim m_OWNERDATA() As OWNERDATA
End Structure

<Serializable()> Public Structure OWNERDATA
    Private m_ID As String
    Public Property ID() As String
        Get
            Return m_ID
        End Get
        Set(ByVal value As String)
            m_ID = value
        End Set
    End Property

    Private m_description As String
    Public Property DESCRIPTION() As String
        Get
            Return m_description
        End Get
        Set(ByVal value As String)
            m_description = value
        End Set
    End Property

    Private m_Name As String
    Public Property Name() As String
        Get
            Return m_Name
        End Get
        Set(ByVal value As String)
            m_Name = value
        End Set
    End Property

End Structure

Public Class ContentSchema

    Public Structure CONTENT
        <XmlElement(ElementName:="VERSION")> Dim m_version() As VERSION
        <XmlElement(ElementName:="CONTENTRECORD")> Dim m_ContentHeader() As ContentHeader
        '<XmlElement(ElementName:="SCHEDULE")> Dim Schedule() As SCHEDULE
        <XmlElement(ElementName:="IMAGE")> Dim m_Image() As IMAGE
        <XmlElement(ElementName:="BINARYFILE")> Dim m_BinaryFile() As BINARYFILE
    End Structure

    Public Structure ContentHeader

        '###########################
        'added by rod.copeland
        '###########################
        Private m_contentID As Integer
        <XmlElement(ElementName:="UserControlID")> Dim m_userControlID As String
        Private m_ownerType As Integer
        Private m_owner As Integer
        Private m_area As Integer
        Private m_locale As Integer

        Public Property ContentID() As Integer
            Get
                Return m_contentID
            End Get
            Set(ByVal value As Integer)
                m_contentID = value
            End Set
        End Property

        Public Property ControlID() As String
            Get
                Return m_userControlID
            End Get
            Set(ByVal value As String)
                m_userControlID = value
            End Set
        End Property


        Public Property OwnerTypeID() As Integer
            Get
                Return m_ownerType
            End Get
            Set(ByVal value As Integer)
                m_ownerType = value
            End Set
        End Property

        Public Property OwnerID() As Integer
            Get
                Return m_owner
            End Get
            Set(ByVal value As Integer)
                m_owner = value
            End Set
        End Property

        Public Property AreaID() As Integer
            Get
                Return m_area
            End Get
            Set(ByVal value As Integer)
                m_area = value
            End Set
        End Property

        Public Property LocaleID() As Integer
            Get
                Return m_locale
            End Get
            Set(ByVal value As Integer)
                m_locale = value
            End Set
        End Property
    End Structure

    <Serializable()> _
    Public Structure VERSION
        Private m_VersionID As Integer
        Public Property VersionID() As Integer
            Get
                Return m_VersionID
            End Get
            Set(ByVal value As Integer)
                m_VersionID = value
            End Set
        End Property

        Private m_ContentID As Integer
        Public Property ContentID() As Integer
            Get
                Return m_ContentID
            End Get
            Set(ByVal value As Integer)
                m_ContentID = value
            End Set
        End Property

        Private m_CreateBy_UserID As Integer
        Private m_CreateDate As Date
        Private m_ModifyBy_UserID As Integer
        Private m_ModifyDate As Date
        Private m_DeleteBy_UserID As Integer
        Private m_DeleteDate As Date
        Private m_ApprovedBy_UserID As Integer
        Private m_ApprovedDate As Date
        Private m_SearchResultDisplayable As Boolean
        Private m_ContentText As String
        Public Property SearchResultDisplayable() As Boolean
            Get
                Return m_SearchResultDisplayable
            End Get
            Set(ByVal value As Boolean)
                m_SearchResultDisplayable = value
            End Set
        End Property
        Public Property ContentText() As String
            Get
                Return m_ContentText
            End Get
            Set(ByVal value As String)
                m_ContentText = value
            End Set
        End Property
        Private m_VersionName As String
        Public Property VERSION_NAME() As String
            Get
                Return m_VersionName
            End Get
            Set(ByVal value As String)
                m_VersionName = value
            End Set
        End Property

        <XmlElement(ElementName:="SCHEDULE")> Dim m_SCHEDULE As SCHEDULE()
        <XmlElement(ElementName:="IMAGE")> Dim m_Image As IMAGE()

    End Structure

    <Serializable()> Public Structure SCHEDULE
        Private m_ScheduleID As Integer
        Private m_VersionID As Integer
        Private m_StartDate As Date
        Private m_EndDate As Date
        Private m_CreateBy_UserID As Integer
        Private m_CreateDate As Date
        Private m_ModifyBy_UserID As Integer
        Private m_ModifyDate As Date
        Private m_DeleteBy_UserID As Integer
        Private m_DeleteDate As Date
        Private m_ApprovedBy_UserID As Integer
        Private m_ApprovedDate As Date

        Public Property ScheduleID() As Integer
            Get
                Return m_ScheduleID
            End Get
            Set(ByVal value As Integer)
                m_ScheduleID = value
            End Set
        End Property
        Public Property VersionID() As Integer
            Get
                Return m_VersionID
            End Get
            Set(ByVal value As Integer)
                m_VersionID = value
            End Set
        End Property
        Public Property StartDate() As Date
            Get
                Return m_StartDate
            End Get
            Set(ByVal value As Date)
                m_StartDate = value
            End Set
        End Property
        Public Property EndDate() As Date
            Get
                Return m_EndDate
            End Get
            Set(ByVal value As Date)
                m_EndDate = value
            End Set
        End Property
        Public Property CreateBy_UserID() As Integer
            Get
                Return m_CreateBy_UserID
            End Get
            Set(ByVal value As Integer)
                m_CreateBy_UserID = value
            End Set
        End Property
        Public Property CreateDate() As Date
            Get
                Return m_CreateDate
            End Get
            Set(ByVal value As Date)
                m_CreateDate = value
            End Set
        End Property
        Public Property ModifyBy_UserID() As Integer
            Get
                Return m_ModifyBy_UserID
            End Get
            Set(ByVal value As Integer)
                m_ModifyBy_UserID = value
            End Set
        End Property
        Public Property ModifyDate() As Date
            Get
                Return m_ModifyDate
            End Get
            Set(ByVal value As Date)
                m_ModifyDate = value
            End Set
        End Property
        Public Property DeleteBy_UserID() As Integer
            Get
                Return m_DeleteBy_UserID
            End Get
            Set(ByVal value As Integer)
                m_DeleteBy_UserID = value
            End Set
        End Property
        Public Property DeleteDate() As Date
            Get
                Return m_DeleteDate
            End Get
            Set(ByVal value As Date)
                m_DeleteDate = value
            End Set
        End Property
        Public Property ApprovedBy_UserID() As Integer
            Get
                Return m_ApprovedBy_UserID
            End Get
            Set(ByVal value As Integer)
                m_ApprovedBy_UserID = value
            End Set
        End Property
        Public Property ApprovedDate() As Date
            Get
                Return m_ApprovedDate
            End Get
            Set(ByVal value As Date)
                m_ApprovedDate = value
            End Set
        End Property

    End Structure

    <Serializable()> Public Structure IMAGE
        <XmlElement(ElementName:="IMAGEID")> Dim m_ImageID As Integer
        Public Property ImageID() As Integer
            Get
                Return m_ImageID
            End Get
            Set(ByVal value As Integer)
                m_ImageID = value
            End Set
        End Property
        <XmlElement(ElementName:="VERSIONID")> Dim m_VersionID As Integer
        Public Property VersionID() As Integer
            Get
                Return m_VersionID
            End Get
            Set(ByVal value As Integer)
                m_VersionID = value
            End Set
        End Property
        Dim m_CreateBy_UserID As Integer
        Dim m_CreateDate As Date
        Dim m_ModifyBy_UserID As Integer
        Dim m_ModifyDate As Date
        Dim m_DeleteBy_UserID As Integer
        Dim m_DeleteDate As Date
        Dim m_ApprovedBy_UserID As Integer
        Dim m_ApprovedDate As Date
        <XmlElement(ElementName:="IMAGEDATA")> Dim m_ImageData As Byte()
        Dim m_Thumbnail As Byte()
        <XmlElement(ElementName:="CAPTION")> Dim m_Caption As String
        Public Property Caption() As String
            Get
                Return m_Caption
            End Get
            Set(ByVal value As String)
                m_Caption = value
            End Set
        End Property

        Dim m_ImageName As String
        Public Property ImageName() As String
            Get
                Return m_ImageName
            End Get
            Set(ByVal value As String)
                m_ImageName = value
            End Set
        End Property

    End Structure

    <Serializable()> Public Structure BINARYFILE
        <XmlElement(ElementName:="BINARYFILEID")> Dim m_BinaryFileID As Integer
        Public Property BinaryFileID() As Integer
            Get
                Return m_BinaryFileID
            End Get
            Set(ByVal value As Integer)
                m_BinaryFileID = value
            End Set
        End Property
        <XmlElement(ElementName:="VERSIONID")> Dim m_VersionID As Integer
        Public Property VersionID() As Integer
            Get
                Return m_VersionID
            End Get
            Set(ByVal value As Integer)
                m_VersionID = value
            End Set
        End Property
        Dim m_CreateByUserID As Integer
        Dim m_CreateDate As Date
        Dim m_ModifyByUserID As Integer
        Dim m_ModifyDate As Date
        Dim m_DeleteByUserID As Integer
        Dim m_DeleteDate As Date
        Dim m_ApprovedByUserID As Integer
        Dim m_ApprovedDate As Date
        <XmlElement(ElementName:="BINARYFILEDATA")> Dim m_BinaryFileData As Byte()
        Dim m_Thumbnail As Byte()
        <XmlElement(ElementName:="CAPTION")> Dim m_Caption As String
        Public Property Caption() As String
            Get
                Return m_Caption
            End Get
            Set(ByVal value As String)
                m_Caption = value
            End Set
        End Property

        Dim m_BinaryFileName As String
        Public Property BinaryFileName() As String
            Get
                Return m_BinaryFileName
            End Get
            Set(ByVal value As String)
                m_BinaryFileName = value
            End Set
        End Property

        Dim m_BinaryFileExtension As String
        Public Property BinaryFileExtension() As String
            Get
                Return m_BinaryFileExtension
            End Get
            Set(ByVal value As String)
                m_BinaryFileExtension = value
            End Set
        End Property

        Dim m_BinaryFileType As String
        Public Property BinaryFileType() As String
            Get
                Return m_BinaryFileType
            End Get
            Set(ByVal value As String)
                m_BinaryFileType = value
            End Set
        End Property
    End Structure

End Class