
//------------------------------------------------
// RSOP_Session
// Currently there can be only one of these per namespace.
//------------------------------------------------
[
    Locale( 0x409 ),
    Description("This describes a single RSOP session.  Currently there can be "
	"only one of these per namespace.")  
]
class RSOP_Session
{
            [
                key, Read,
                Description("Session ID"),
                DisplayName("ID")  
            ]
    string id;

            [
                Description("Version number of schema."), Read, 
                DisplayName("Version")  
            ]
    uint32 version = 0;

            [
                Description("Target user or computer."), Read, 
                DisplayName("Target Name")  
            ]
    string targetName = "";

            [
                Description("New group of target."), Read, 
                DisplayName("SOM")  
            ]
    string SOM = "";

            [
                Description("Security IDs of the new groups for target."), Read, 
                DisplayName("Security Groups")  
            ]
        string SecurityGroups[];

            [
                Description("Site of target"), Read, 
                DisplayName("Site")  
            ]
    string Site;

            [
                Description("Flags."), Read, 
                DisplayName("Flags")  
            ]
    uint32 flags = 0;

            [
                Description("Time this namespace was created."), Read, 
                DisplayName("Creation Time")  
            ]
    datetime creationTime;

            [
                Description("Time after lastPolicyApplicationTime when this namespace "
				"can be deleted."), Read, 
                DisplayName("Time to Live")  
            ]
    uint32 ttlMinutes;

            [
                Description("Flag that indicates whether the policy was applied "
				"over a slow link."), Read, 
                DisplayName("Is Slow Link")  
            ]
    boolean  slowLink;
};

//------------------------------------------------
// RSOP_SOM
// Comment: Abstraction for Scope of Management.
//          A scope of management can be a site, domain, organizational unit or local scope.
//------------------------------------------------
[
    Locale( 0x409 ),
    Description("The RSOP_SOM class is an abstraction for a Scope of Management.  "
	"A scope of management can be a site, domain, organizational unit or local scope.")  
]
class RSOP_SOM
{
            [
                key,
                Description("SOM id, which is a unique identifier for objects "
				"of this class"), Read,
                DisplayName("ID")  
            ]
    string id;

            [
                key,
                ValueMap {"1", "2"}, 
                Values {"Normal", "Loopback"}, 
    		    Description("Reason that the SOM is applicable, 1= Normal, "
				"2 = Loopback"), Read,
                DisplayName("Reason")  
            ]
    uint32 reason = 1;

            [
                ValueMap {"1","2", "3", "4"},  
                Values {"Local", "Site", "Domain", "OU" }, 
        		Description("1 = local, 2 = site, 3 = domain, 4 = OU"), Read,
        	    DisplayName("Type")  
            ]
    uint32 type;

            [
                Description("The order in which this SOM is evaluated with regard "
				"to other SOMs when evaluating Group Policy for the current target"), 
				Read, DisplayName("SOM Order")  
            ]
    uint32 SOMOrder;

            [
                Description("Flag to indicate whether this SOM blocks inheritance of "
				"policy from other SOMs higher in the SDOU hierarchy"), Read, 
                DisplayName("Is Blocking")  
            ]
    boolean  blocking = false;

            [
                Description("Flag to indicate that this SOM is blocked"
				"by a SOM lower in the SDOU hierarchy"), Read, 
                DisplayName("Is Blocked")  
            ]
    boolean  blocked = false;
};


//------------------------------------------------
// RSOP_GPO
// Comment: Abstraction for a Group Policy Object
//------------------------------------------------
[
    Locale( 0x409 ),
    Description("The RSOP_GPO class is an abstraction for a Group Policy "
	"Container or Object")
]
class RSOP_GPO
{
            [
                key,
                Description("This is the GP container path as retrieved from the DS."), 
				Read,  DisplayName("ID")  
            ]
    string id;

            [
                Description("A user friendly name. This name may not be unique"), Read, 
                DisplayName("Name")  
            ]
    string name = "";

            [
                Description("GPO Name as a guid."), Read, 
                DisplayName("GPO GUID")  
            ]
    string guidName = "";

            [
                Description("Version Number of this GPO."), Read, 
                DisplayName("Version")  
            ]
    uint32 version = 0;

            [
                Description("Flag to indicate whether this GPO is enabled"), Read, 
                DisplayName("Is Enabled")  
            ]
    boolean  enabled = true;

            [
                Description("Array of bytes containing the security descriptor "
				"associated with this GPO in self-relative format."), Read, 
                DisplayName("Security Descriptor")  
            ]
    uint8  securityDescriptor[];

            [
                Description("Path to the file system, i.e. sysvol part of the GPO."), 
				Read, DisplayName("File System Path")  
            ]
    string fileSystemPath = "";

            [
                Description("Flag to indicate that a GPO is found but inaccessible "
				"for security reasons."), Read, 
                DisplayName("Is Access Denied")  
            ]
    boolean  accessDenied = false;
    
            [
                Description("Id of WQL filter on GPO."), Read,
                DisplayName("WQL Filter")  
            ]
    string  filterId = "";

            [
                Description("Flag to indicate whether a GPO passed the filter check."), 
				Read, DisplayName("Is Filter Allowed")  
            ]
    boolean  filterAllowed = true;
};

//------------------------------------------------
// RSOP_GPLink
// Comment: Link of GPO to SOM
//------------------------------------------------
[
    Association: ToInstance,
    Locale( 0x409 ),
    Description("This class represents the links from a domain, OU, site or "
	"local scope to GPOs")  
]
class RSOP_GPLink
{
            [
                key,
                Description("Reference to the SOM or scope of management "
				"associated with this link"), Read,
                DisplayName("SOM")  
            ]
    RSOP_SOM ref SOM;

            [
                key,
                Description("Reference to GPO associated with this link"), Read,
                DisplayName("GPO")
            ]
    RSOP_GPO ref GPO;

            [
                key,
                Description("Order of the GPO within the SOM"), Read,
                DisplayName("SOM Order")  
            ]
    uint32 somOrder = 0;

            [
                Description("Overall Order of the GPO Links found across"
				"all the applicable SOMs"), Read,
                DisplayName("Link Order")  
            ]
    uint32 linkOrder = 0;

            [
                Description("Overall Order of the Applied GPO Links found across"
				"all the applicable SOMs"), Read,
                DisplayName("Applied Order")  
            ]
    uint32 appliedOrder = 0;

            [
                Description("Indicates whether this link is enabled or disabled"), 
				Read, DisplayName("Is Enabled")  
            ]
    boolean enabled = true;

            [
                Description("Indicates whether this link is enforced down the "
				"SOM hierarchy"), Read, 
                DisplayName("Force")  
            ]
    boolean noOverride = false;

};


//------------------------------------------------
// RSOP_PolicySetting
// Comment: Abstraction for generic policy object
//------------------------------------------------
[
    abstract,
    Locale( 0x409 ),
    Description("The RSOP_PolicySetting class is the abstract parent object from "
	"which client-side extensions' policy objects are inherited")  
]
class RSOP_PolicySetting
{
    //
    // Classes deriving from RSOP_PolicySetting must redefine "id" as a key
    //
            [
                Required,
                Not_Null, Read,
                Description("Unique identifier for objects of this class.  \nNote: "
				"Classes deriving from RSOP_PolicySetting must redefine 'id' as a key"),
                DisplayName("ID")  
            ]
    string id;

    //
    // Classes deriving from RSOP_PolicySetting must redefine "precedence" as a key
    //
            [
                Required,
                Not_Null, Read,
                Description(
				"The order or precedence in which this Policy Object is applied."
				"The winning policy is contained in the Policy Object whose precedence is 1. "
                "Precedence greater that 1 means that the policy contained in this Policy "
                "Object is a conflicting value that did not 'win'.  \nNote: Classes deriving "
				"from RSOP_PolicySetting must redefine 'precedence' as a key"), 
                DisplayName("Precedence") 
            ]
    uint32 precedence;

            [
                Description("User friendly name of this policy object"), Read,
                DisplayName("Name")  
            ]
    string name = "";

            [
                Description("Identifies the GPO that contains this Policy Object."
                             "A client-side extension obtains this value from"
                             "PGROUP_POLICY_OBJECT->lpDSPath. The prefix"
                             "LDAP://CN=Machine from lpDSPath should be stripped"), 
				Read, DisplayName("GPO ID")  
            ]
    string GPOID = "";

            [
                Description("The SOM associated with the GPLink that references the GPO"
                             "that contains this Policy Object. A client-side extension"
                             "obtains this value from PGROUP_POLICY_OBJECT->lpLink."
                             "The prefix LDAP:// from lpLink should be stripped"), Read,
                DisplayName("SOM")  
            ]
    string SOMID = "";

            [
                Description("Time this policy object was created."), Read,
                DisplayName("Creation Time")  
            ]
    datetime creationTime;

};

//------------------------------------------------
// RSoP_PolicySettingStatus
// Comment: Abtraction for error status of the policy setting
//------------------------------------------------
[
    Locale( 0x409 ),
    Description("The RSoP_PolicySettingStatus class provides information about a "
	"specific error that occured when trying to apply a policy setting.")  
]
class RSoP_PolicySettingStatus
{
            [
                key,
                Description("Unique ID."), Read,
                DisplayName("ID")  
            ]
    string id;

            [
                Description("The name of the source that generated the event."), Read,
                DisplayName("Event Source")  
            ]
    string  eventSource;

            [
                Description("The name of the event log type where the event was logged. "
				"E.g. Application, System."), Read,
                DisplayName("Event Log Name")  
            ]
    string eventLogName;
    
            [
                Description("A number that identifies the event in the event log."), Read, 
                DisplayName("Event ID")  
            ]
    uint32  eventID;

            [
                Description("The time at which the event was logged."), Read,
                DisplayName("Time")  
            ]
    datetime eventTime;

            [
                Description("A Win32 error code that indicates the actual failure."), Read, 
                DisplayName("Error Code")  
            ]
    uint32  errorCode;

            [
                ValueMap {"0", "1", "2", "3", "4"},
                Values { "Unspecified", "Applied", "Ignored", "Failed", "SubsettingFailed" },
                Description("The status of this setting"), Read, 
                DisplayName("Status")  
            ]
    sint32  status = 0;
};

//------------------------------------------------
// RSoP_PolicySettingLink
// Comment: association between a policy setting and its status
//------------------------------------------------
[
    Locale( 0x409 ),
    Description("An association between a policy setting and its status."),
    Association: ToInstance
]
class RSoP_PolicySettingLink
{
            [
                key,
                Description("Reference to the RSOP_PolicySetting"), Read,
                DisplayName("Setting")  
            ]
    RSOP_PolicySetting ref setting;

            [
                key,
                Description("Reference to the RSoP_PolicySettingStatus"), Read,
                DisplayName("Status")  
            ]
    RSoP_PolicySettingStatus ref status;
};

//------------------------------------------------
// RSOP_RegistryPolicySetting
// Comment: Abtraction for registry extension policy data
//------------------------------------------------
[
    Locale( 0x409 ), 
    Description("Policy object for registry or Administrative Templates extension."
                "Policy settings in an .adm file involve settings values on registry"
                "keys which is abstracted by this class.")  
]
class RSOP_RegistryPolicySetting : RSOP_PolicySetting
{
            [
                key,
                Description("Inherited from RSOP_PolicySetting"), Read,
                DisplayName("ID")  
            ]
    string id;

            [
                key,
                Description("Inherited from RSOP_PolicySetting"), Read,
                DisplayName("Precedence")  
            ]
    uint32 precedence;

            [
                Description("Name of the registry key,"), Read,
                DisplayName("Registry Key")  
            ]
    string registryKey = "";

            [
                Description("Name of registry value"), Read,
                DisplayName("Value Name")  
            ]
    string valueName = "";

            [
                Description("Data type of value, which corresponds to registry "
				"value types such as REG_SZ."), Read,
                DisplayName("Type")  
            ]
    uint32 valueType = 0;

            [
                Description("Value represented by an array of bytes"), Read,  
                DisplayName("Value")  
            ]
    uint8  value[];

            [
                Description("Indicates whether the registry key, or registry value "
				"has been deleted."), Read,
                DisplayName("Is Deleted")  
            ]
    boolean deleted = false;

            [
                Description("Command being run on the key, or value."), Read,
                DisplayName("Command")  
            ]
    string command = "";
};


//------------------------------------------------
// RSOP_AdministrativeTemplateFile
// Comment: Abtraction for adminstrative templates file
//------------------------------------------------
[
    Locale( 0x409 ), 
    Description("Administrative Template File")  
]
class RSOP_AdministrativeTemplateFile
{
            [
                key,
                Description("File name, including path, of administrative "
				"template file"), Read,
                DisplayName("Name")  
            ]
    string name;

            [
                key,
                Description("Identifies the GPO that contains this Policy "
				"Object"), Read,
                DisplayName("GPO ID")  
            ]
    string GPOID = "";

             [
                Description("Time the administrative template file was last written"), Read, 
                DisplayName("Last Write Time")  
            ]
    datetime lastWriteTime;
};

//------------------------------------------------
// RSOP_ScriptPolicySetting
// Comment: Abstraction for script extension policy data
//------------------------------------------------
[
    Locale( 0x409 ),
    Description("Class that represents policy data for scripts extension")
]
class RSOP_ScriptPolicySetting : RSOP_PolicySetting
{
            [
                key,
                Description("Inherited from RSOP_PolicySetting"), Read,
                DisplayName("ID")  
            ]
    string id;

            [
                key,
                Description("Inherited from RSOP_PolicySetting"), Read,
                DisplayName("Precedence")  
            ]
    uint32 precedence;

            [
                ValueMap {"1", "2", "3", "4"},
                Values { "Logon", "Logoff", "Startup", "Shutdown" },
                Description("Indicate when the scripts in 'ScriptList' are to "
				"be run: 1=Logon, 2=logoff, 3=startup, 4=shutdown. "), Read,
                DisplayName("Script Type")  
            ]
    uint32 scriptType = 0;

            [
                Description("List of RSOP_ScriptCmd objects containing information "
				"about the scripts to be run."), Read,
                DisplayName("Script List")  
            ]
    RSOP_ScriptCmd scriptList[];

            [
                key,
                Description("Relative order of instantiation of "
				"RSOP_ScriptPolicySetting"), Read, 
                DisplayName("Script Order")  
            ]
    uint32 scriptOrder = 0;
};

//------------------------------------------------
// RSOP_ScriptCommand
// Comment: Abstraction for the script and its parameters
//------------------------------------------------
[
    Locale( 0x409 ),
    Description("Class that represents a list of  scripts")  
]
class RSOP_ScriptCmd
{
            [
                Description("Name of the script to be run"), Read,
                DisplayName("Script")  
            ]
    string  script;

            [
                Description("Arguments to the script command."), Read,
                DisplayName("Arguments")  
            ]
    string  arguments;

            [
                Description("Script execution time."), Read,
                DisplayName("Execution Time")  
            ]
    datetime executionTime;
};

//------------------------------------------------
// RSOP_ApplicationManagementCategory
// Comment: Abstraction for application management categories
//------------------------------------------------

[
    Locale( 0x409 ),
    Description("Class that represents the a category of applications in"
                "the Add/Remove Programs control panel applet.")  
]

class RSOP_ApplicationManagementCategory
{
            [
                key,
                Description("The unique identifier for the category."), Read,
                DisplayName("Category Id")  
            ]
    string   CategoryId;

            [
                Description("Name of the category"), Read,
                DisplayName("Name")  
            ]
    string   Name;

            [
                Description("Time this instance was created"), Read,
                DisplayName("Display Name")  
            ]
    datetime CreationTime;
};

//------------------------------------------------
// RSOP_ApplicationManagementPolicySetting
// Comment: Abstraction for application management policy data
//------------------------------------------------

[
    Locale( 0x409 ),
    Description("Application Management Policy Setting")
]
class RSOP_ApplicationManagementPolicySetting : RSOP_PolicySetting
{
            [
                key,
                Description("Inherited from RSOP_PolicySetting"), Read,
                DisplayName("ID")  
            ]
    string id;

            [
                key,
                Description("Inherited from RSOP_PolicySetting"), Read,
                DisplayName("Precedence")  
            ]
    uint32 precedence;

    //
    // Properties that describe the application itself
    //
            [
                key,
                ValueMap {"1", "2", "3"},
                Values { "Applied", "Removed", "ARP" },
                Description("Describes the contents of the instance: "
				"1 = Applied Application, 2 = Removed Application, "
				"3 = ARP List item."), Read,
                DisplayName("Entry Type")  
            ]
    uint32      EntryType;

            [
                key,
                Description("Guid that identifies this application."), Read,
                DisplayName("Application Id")  
            ]
    string      ApplicationId;

            [
                ValueMap {"1", "2"},
                Values { "WindowsInstaller", "ZAP" },
                Description("This describes the type of the package to be "
				"installed: 1 = Windows Installer, 2 = ZAP."), Read,
                DisplayName("Package Type")  
            ]
    uint32      PackageType;

            [
                Description("The Windows Installer product code, a unique "
				"id identifying the software product."), Read,
                DisplayName("Product Id")  
            ]
    string      ProductId;

            [
                Description("Name of the vendor of the software."), Read,
                DisplayName("")  
            ]
    string      Publisher;

            [
                Description("For Windows Installer packages, this is the file "
				"system path to the Windows installer package.  For ZAP packages, "
				"this is the path to the setup.exe program."), Read,
                DisplayName("Package Location")  
            ]
    string      PackageLocation;

            [
                Description("A fully qualified path to the Windows Installer "
				"advertisement script."), Read,
                DisplayName("Script File")  
            ]
    string      ScriptFile;

            [
                Description("A list of CategoryId guids for categories that apply "
				"to this application.  Each guid corresponds to one of the CategoryId "
				"properties of an instance of RSOP_ApplicationManagementCategory."), 
				Read, DisplayName("Categories")  
            ]
    string      Categories[];


    //
    // Properties describing the precedence relationship between this deployed 
    // application and other applications
    //                        
            [
                ValueMap {"1", "2", "3", "4", "5", "6"},
                Values { "Language", "Product", "Time", 
				"Upgrade", "Highest", "NonForced" },
                Description(
				"If this application has a lower precedence than another, "
				"the reason this application has the lower precedence than "
				"the next highest precedence application.  \n"
                "1 = This application's Language is a less suitable match for the target, \n"
                "2 = This application's Product Identifier conflicts with the higher application \n"
                "3 = This application was deployed more recently than the higher application \n"
                "4 = This application is upgraded by the higher precedence application. \n"
                "5 = This application is the winning application \n"
                "6 = This assigned application is upgraded by an optional upgrade"), Read, 
                DisplayName("Precedence Reason")  
            ]
    uint32      PrecedenceReason;


    //
    // Properties relating to the version of the application and its deployment
    //
            [
                Description("Minor version number of the application."), Read,
                DisplayName("Version Number Lo")  
            ]
    uint32      VersionNumberLo;

            [
                Description("Major version number of the application."), Read,
                DisplayName("Version Number Hi")  
            ]
    uint32      VersionNumberHi;

            [
                Description("The number of times this application has been "
				"re-deployed."), Read,
                DisplayName("Redeploy Count")  
            ]
    uint32      RedeployCount;

            [
                Description("The last modification time of this application by the administrator"
                         "when the application was applied to this target."), Read,
                DisplayName("Deployment Last Modify Time")  
            ]
    datetime    DeploymentLastModifyTime;

      
    //
    // Properties that affect what targets may receive this application
    //
            [
                Description(
				"Security desriptor of the deployed application. This descriptor "
				"is in self-relative format"), 
				Read, DisplayName("Security Descriptor")  
            ]
    uint8       SecurityDescriptor[];

            [
                Description("A list of Win32 machine architectures supported "
				"by this application."), Read,
                DisplayName("Machine Architectures")  
            ]
    uint32      MachineArchitectures[];

            [
                Description("A Windows language ID for the language supported "
				"by the application."), Read,
                DisplayName("Language Id")  
            ]
    uint32      LanguageId;

    //
    // Properties describing the settings chosen by the administrator for this application
    //
            [
                ValueMap {"1", "2"},
                Values { "Assigned", "Published" },
                Description("Whether the application is assigned or published: "
				"1 = Assigned, 2 = Published."), Read,
                DisplayName("Deployment Type")  
            ]
    uint32      DeploymentType;

            [
                ValueMap {"1", "2", "3"},
                Values { "NotAssigned", "Standard", "Install" },
                Description("For assigned applications, whether or not a "
				"lightweight install or an actual install is performed \n"
                         "1 = This is not an assigned application \n"
                         "2 = Lightweight install \n"
                         "3 = Install"), Read, 
                DisplayName("Assignment Type")  
            ]
    uint32      AssignmentType;

            [
                ValueMap {"1", "2"},
                Values { "Basic", "Maximum" },
                Description("The user interface level of the install: "
				"1 = Basic, 2 = Maximum."), Read,
                DisplayName("Installation UI")  
            ]
    uint32      InstallationUI;

            [
                Description("If TRUE, the application may be used to satisfy a "
				"demand install for a clsid or file extension.  If FALSE, the "
				"application may not be used for this purpose."), Read,
                DisplayName("Demand Installable")  
            ]
    boolean     DemandInstallable;

            [
                Description("If this is an X86-only application, this property "
				"is true if the application may be deployed to an ia64 computer."
                "If FALSE, the application may not be deployed to an ia64 computer."), 
				Read, DisplayName("AllowX86OnIA64")  
            ]
    boolean     AllowX86OnIA64;

            [
                ValueMap {"1", "2"},
                Values { "Uninstall", "Unmanage" },
                Description("Determines the behavior of the software when the GPO "
				"for the application goes out of scope: 1 = uninstall the software, "
				"2 = Unmanage it."), Read,
                DisplayName("Loss Of Scope Action")  
            ]
    uint32      LossOfScopeAction;

            [
                Description("If TRUE, this application will cause currently installed "
				"unmanaged applications with the same Windows Installer Product Identifier "
				"to be removed in order to install this application."), Read,
                DisplayName("Uninstall Unmanaged")  
            ]
    boolean     UninstallUnmanaged;

            [
                Description("If TRUE, this application may be displayed in the ARP "
				"applet.  If FALSE, it will not be displayed in the applet."), Read,
                DisplayName("Display In ARP")  
            ]
    boolean     DisplayInARP;

            [
                Description("If TRUE, language is ignored when determining whether "
				"this application applies to a user or machine. If FALSE, language "
				"is taken into consideration."), Read,
                DisplayName("Ignore Language")  
            ]
    boolean     IgnoreLanguage;

            [
                Description("A list of file system paths to Windows Installer "
				"transform files used to modify this application's package."), Read,
                DisplayName("Transforms")  
            ]
    string      Transforms[];

            [
                Description("A URL for presentation to the user when support for the application is needed"), Read,
                DisplayName("SupportURL")  
            ]
    string      SupportURL;

    //
    // Properties describing upgrade relationships
    //
            [
                Description("A list of ApplicationId's in guid form for "
				"applications replaced (uninstalled) by this application.  Each ApplicationId "
				"corresponds to the ApplicationId property of an instance of "
				"RSOP_ApplicationManagementPolicySetting."),
                Read,
                DisplayName("Replaceable Applications")  
            ]
    string      ReplaceableApplications[];

            [
                Description("A list of ApplicationId's in guid form for applications "
				"that upgraded (installed over) by applying this application.  Each ApplicationId corresponds "
				"to the ApplicationId property of an instance of "
				"RSOP_ApplicationManagementPolicySetting."), Read,
                DisplayName("Upgradeable Applications")  
            ]
    string      UpgradeableApplications[];

            [
                Description("If TRUE, this application must be installed if one "
				"of the applications in its list of upgradeable or replaceable applications is already applied "
				"to the target"), Read,
                DisplayName("Upgrade Settings Mandatory")  
            ]
    boolean     UpgradeSettingsMandatory;


    //
    // Properties describing why this application was applied to a target
    // 
            [
                ValueMap {"1", "2", "3", "4"},
                Values { "Assignment", "Applied", "Upgrades", "Conditional" },
                Description("The reason that this application was eligible for application to the target \n"
                         "1 = It was assigned, \n"
                         "2 = The application is applied to the user's profile, \n"
                         "3 = The application had potential upgrades for other applied settings, \n"
                         "4 = The application would be eligible in logging mode only if the application were already applied to the target "), Read,
                DisplayName("Eligibility")  
            ]
    uint32      Eligibility;

            [
                ValueMap {"1", "2", "3", "4", "5", "6", "7", "8"},
                Values { "Assignment", "User", "Profile", "Extension", "Clsid", 
				"Upgrade", "ProgId", "None" },
                Description("The situation that triggered the installation of the application:  \n"
                         "1 = It was assigned, \n"
                         "2 = User Installed through Add / Remove Programs, \n"
                         "3 = The application was already installed in the user's profile \n"
                         "4 = Installed via file extension activation, \n"
                         "5 = installed via clsid activation, \n"
                         "6 = Forced upgrade of locally installed application at logon. \n"
                         "7 = Installed via ProgId activation \n"
                         "8 = The application was re-deployed"), Read,
                DisplayName("Apply Cause")  
            ]
    uint32      ApplyCause;

            [
                ValueMap {"1", "2", "3", "4", "5"},
                Values { "System", "English", "Ignore", "Neutral", "None" },
                Description("This indicates how the language was matched to the system: \n"
                             "1 = the application language matched the system language, \n"
                             "2 = the application language was English, \n"
                             "3 = the application had the IgnoreLanguage attribute, \n"
                             "4 = the application was language neutral, \n"
                             "5 = Language did not match."), Read, 
                DisplayName("Language Match")  
            ]
    uint32      LanguageMatch;

            [
                Description("If the application was installed via on-demand "
				"installation by a file extension, this is the file extension "
				"that caused that installation."), Read,
                DisplayName("On Demand File Extension")  
            ]
    string      OnDemandFileExtension;

            [
                Description("If the application was installed via on-demand "
				"installation through a COM activation, this is the CLSID that "
				"caused the installation"), Read,
                DisplayName("On Demand Clsid")  
            ]
    string      OnDemandClsid;

            [
                Description("If the application was installed via on-demand "
				"installation through a COM activation, this is the ProgId "
				"that caused the installation"), Read,
                DisplayName("On Demand Prog Id")  
            ]
    string      OnDemandProgId;


    //
    // Properties describing why this application was un-applied from the target
    // 
            [
                ValueMap {"1", "2", "3", "4", "5", "6", "7"},
                Values { "None", "Upgraded", "Administrative", "User", "Scope", 
				"Transform", "Product" },
                Description("The situation that triggered the removal of the application: \n"
                         "1 = not removed, \n"
                         "2 = upgraded, \n"
                         "3 = Removed by admin, \n"
                         "4 = removed by user, \n" 
                         "5 = Application went out of scope, \n" 
                         "6 = Removed due to transform conflict, \n"
                         "7 = Removed due to product conflict, \n"
                         "8 = Removed due to removal from user profile."), Read,
                DisplayName("Removal Cause")  
            ]
    uint32      RemovalCause;

            [
                ValueMap {"1", "2", "3", "4"},
                Values { "Not Removed", "Upgraded", "Uninstalled", "Unmanaged" },
                Description("Describes the manner in which this application "
				"ceased to be applied: 1 = not removed, 2 = upgraded, 3 = uninstalled, "
				"4 = Unmanaged."), Read, 
                DisplayName("Removal Type")  
            ]
    uint32      RemovalType;

            [
                Description("A guid corresponding to the ApplicationId property "
				"of RSOP_ApplicationManagmentPolicySetting for the application that "
				"caused this application to no longer apply to the target."), Read,  
                DisplayName("Removing Application")  
            ]
    string      RemovingApplication;
};

//------------------------------------------------
// RSOP_FolderRedirectionPolicySetting
// Comment: Abstraction for folder redirection policy data
//------------------------------------------------

[
    Locale( 0x409 ),
    Description("Class that represents data for folder redirection extension")  
]
class RSOP_FolderRedirectionPolicySetting : RSOP_PolicySetting
{
            [
                key,
                Description("Inherited from RSOP_PolicySetting"), Read, 
                DisplayName("ID")  
            ]
    string id;

            [
                key,
                Description("Inherited from RSOP_PolicySetting"), Read, 
                DisplayName("Precedence")  
            ]
    uint32 precedence;

            [
                Description("Security group membership that caused this folder to redirect"), 
				Read, DisplayName("redirecting Group")  
            ]
    string redirectingGroup;

            [
                Description("Path to which this folder is redirected"), Read,
                DisplayName("Resultant Path")  
            ]
    string resultantPath;

            [
                ValueMap {"1", "2"},
                Values { "Basic", "Advanced" },
                Description("Installation Type: 1 = basic, 2 = advanced"), Read, 
                DisplayName("installation Type")  
            ]
    uint32 installationType;

            [
                Description("Groups, represented by an array of security groups"), Read, 
                DisplayName("security Groups")  
            ]
    string securityGroups[];

            [
                Description("Paths, represented by an array of redirection paths"), Read, 
                DisplayName("redirected Paths")  
            ]
    string redirectedPaths[];

            [
                Description("Indicates whether the user is granted exclusive access"), 
				Read, DisplayName("grant Type")  
            ]
    boolean grantType;

            [
                Description("Indicates whether or not the contents of the local "
				"directory are moved"), Read, 
                DisplayName("move Type")  
            ]
    boolean moveType;

            [
                ValueMap {"1", "2"},
                Values { "None", "Profile" },
                Description("Action to take on policy removal: 1 = leave folder in new "
                "location, 2 = redirect the folder back to the user profile location"), 
				Read, DisplayName("policy Removal")  
            ]
    uint32 policyRemoval;
};

//------------------------------------------------
// RSOP_ExtensionStatus
// Comment: Generic Extension Status object
//------------------------------------------------
[
    Locale( 0x409 ),
    Description("Class that represents client-side extensions' Session Status")  
]
class RSOP_ExtensionStatus
{
            [
                key,
                Description("Guid of the extension"), Read,   
                DisplayName("Extension GUID")  
            ]
    string extensionGuid= "";

            [
                Description("Display name of the extension being run"), Read, 
                DisplayName("Name")  
            ]
    string displayName= "";

            [
                Description("Time when this CSE was last invoked."), Read,  
                DisplayName("Begin Time")  
            ]
    datetime beginTime;

            [
                Description("Time when this CSE finished processing the last invoked."), 
				Read,  DisplayName("End Time")  
            ]
    datetime endTime;

            [
                ValueMap {"1", "2", "3"},
                Values { "Logging - Complete", "Logging - Not Complete", 
				"Logging - Not Supported"},
                Description("Logging Status:  " 
                        "1 = Client Side Extension logged data successfully, \n" 
                        "2 = Client Side Extension logged could not log data, "
						"data might be incomplete, \n"
                        "3 = Client Side Extension does not support logging"), 
				Read, DisplayName("Status")  
            ]
    uint32 loggingStatus = 1;

            [
                Description("Error code if any that has caused the processing to abort"), 
				Read, DisplayName("Error Code")  
            ]
    uint32 error = 0;
};

//------------------------------------------------
// RSOP_ExtensionEventSource
//------------------------------------------------
[
    Locale( 0x409 ),
    Description("Class that represents client-side extensions' event log message sources")  
]
class RSOP_ExtensionEventSource
{
            [
                key,
                Description("Unique ID."), Read, 
                DisplayName("ID")  
            ]
    string id;

            [
                Description ("the event source that can report an event when "
				"this CSE is applying policy"), Read, 
                DisplayName("Event Log Source")  
            ]
    string eventLogSource;

            [
                Description ("the event log name that can report an event when "
				"this CSE is applying policy"), Read, 
                DisplayName("Event Log Name")  
            ]
    string eventLogName;
};

//------------------------------------------------
// RSOP_ExtensionEventSourceLink
//------------------------------------------------
[
    Locale( 0x409 ),
    Description("Class that represents client-side extensions' event log message sources")  
]
class RSOP_ExtensionEventSourceLink
{
            [
                key,
                Description ("CSE status"), Read, 
                DisplayName("Extension Status")  
            ]
    RSOP_ExtensionStatus ref extensionStatus;

            [
                key,
                Description ("event source"), Read, 
                DisplayName("Event Source")  
            ]
    RSOP_ExtensionEventSource ref eventSource;
};

//-------------------------------------------
// End of classes file
//-------------------------------------------
