//---------------------------------------------------------------------------- // // Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved. // // File: AMT_AuditPolicyRule.cs // // Contents: Represents event policies. // This file was automatically generated from AMT_AuditPolicyRule.mof // //---------------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Text; using System.Globalization; using System.Xml.Serialization; using System.IO; using Intel.Manageability.WSManagement; using Intel.Manageability.Cim.Untyped; namespace Intel.Manageability.Cim.Typed { /// ///Represents event policies. /// [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AuditPolicyRule")] [System.Xml.Serialization.XmlRootAttribute("AMT_AuditPolicyRule", Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AuditPolicyRule", IsNullable=false)] public class AMT_AuditPolicyRule : CIM_PolicyRule { /// /// Default constructor. /// public AMT_AuditPolicyRule() :base() { } /// /// Constructor that recieves an xml string for deserialization. /// /// xml string to deserialize public AMT_AuditPolicyRule(string xml): base((IWSManClient)null) { this.Deserialize(xml); } /// /// Constructor which recieves a Ws-Management client object. /// /// Ws-Management client public AMT_AuditPolicyRule(IWSManClient client): base(client) { } /// /// Required, List of application events the policy rule applies to. /// [CimField(false, true)] public virtual uint[] AuditApplicationEventID { get { return CimTypesUtils.StringArrayToArray(this["AuditApplicationEventID"]); } set { string[] arr = CimTypesUtils.ArrayToStringArray(value); this.SetOrAddField("AuditApplicationEventID", arr); } } /// /// Required, For each audited event, a flag indicating the type of policy. For example: indicating if the policy is defined as critical. /// [CimField(false, true)] public virtual uint[] PolicyType { get { return CimTypesUtils.StringArrayToArray(this["PolicyType"]); } set { string[] arr = CimTypesUtils.ArrayToStringArray(value); this.SetOrAddField("PolicyType", arr); } } /// ///This routine is used to enable or disable auditing of a single event. Certain events are predefined as always logged. They are included in the audit log policy whether they were requested explicitly or not. Attempting to remove such events from audit log policy will return an error. Certain events are predefined as never critical. Attempting to include such events in a policy and marking them as critical will return an error. /// [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] [System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AuditPolicyRule", IsNullable=false)] private class SetAuditPolicy_INPUT : CimParams { public SetAuditPolicy_INPUT(string ns) : base(ns) { } /// /// Required, This flag indicates whether the requested operation is enable or disable. /// [CimField(false,true)] public virtual bool Enable { set { this.SetOrAddField("Enable",value.ToString().ToLower(CultureInfo.InvariantCulture)); } } /// /// Required, The application ID of the event. /// [CimField(false,true)] public virtual ushort AuditedAppID { set { this.SetOrAddField("AuditedAppID",value.ToString(CultureInfo.InvariantCulture)); } } /// /// Required, The ID of the event. /// [CimField(false,true)] public virtual ushort EventID { set { this.SetOrAddField("EventID",value.ToString(CultureInfo.InvariantCulture)); } } /// /// Optional, A flag indicating the type of policy. For example: indicating if the policy is defined as critical. When the audit log is locked or full, all critical events will not be executed, and will return a failure status code. This flag is not required for a disable request. /// [CimField(false,false)] public virtual uint PolicyType { set { this.SetOrAddField("PolicyType",value.ToString(CultureInfo.InvariantCulture)); } } } /// ///This routine is used to enable or disable auditing of a single event. Certain events are predefined as always logged. They are included in the audit log policy whether they were requested explicitly or not. Attempting to remove such events from audit log policy will return an error. Certain events are predefined as never critical. Attempting to include such events in a policy and marking them as critical will return an error. /// [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] [System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AuditPolicyRule", IsNullable=false)] private class SetAuditPolicy_OUTPUT : CimParams { public SetAuditPolicy_OUTPUT() : base("") { } } /// ///This routine is used to enable or disable auditing of a single event. Certain events are predefined as always logged. They are included in the audit log policy whether they were requested explicitly or not. Attempting to remove such events from audit log policy will return an error. Certain events are predefined as never critical. Attempting to include such events in a policy and marking them as critical will return an error. /// /// Required, IN -This flag indicates whether the requested operation is enable or disable. /// Required, IN -The application ID of the event. /// Required, IN -The ID of the event. /// Optional, IN -A flag indicating the type of policy. For example: indicating if the policy is defined as critical. When the audit log is locked or full, all critical events will not be executed, and will return a failure status code. This flag is not required for a disable request. /// /// Legal values: /// PT_STATUS_SUCCESS : 0 /// PT_STATUS_INTERNAL_ERROR : 1 /// PT_STATUS_NOT_READY : 2 /// PT_STATUS_NOT_PERMITTED : 16 /// PT_STATUS_INVALID_PARAMETER : 36 /// PT_STATUS_FLASH_WRITE_LIMIT_EXCEEDED : 38 /// PT_STATUS_AUDIT_FAIL : 2075 /// public virtual uint SetAuditPolicy(bool? inEnable,ushort? inAuditedAppID,ushort? inEventID,uint? inPolicyType) { SetAuditPolicy_INPUT input = new SetAuditPolicy_INPUT(this.XmlNamespace); if (inEnable.HasValue) input.Enable=inEnable.Value; if (inAuditedAppID.HasValue) input.AuditedAppID=inAuditedAppID.Value; if (inEventID.HasValue) input.EventID=inEventID.Value; if (inPolicyType.HasValue) input.PolicyType=inPolicyType.Value; SetAuditPolicy_OUTPUT output = new SetAuditPolicy_OUTPUT(); uint returnValue = base.Invoke("SetAuditPolicy",input,out output); return returnValue; } /// ///This method enables or disables auditing of multiple events. ///Certain events are predefined as always logged. They are included in the audit log policy whether they were requested explicitly or not. Attempting to remove such events from the audit log policy will return an error. ///Certain events are predefined as never critical. Attempting to include such events in a policy and marking them as critical will return an error. ///If a policy event is configured more than once, the last configuration will be applied. ///If there is an error, the current audit log policy configuration will not be changed. ///If the request size is too large to be processed, divide the request into multiple smaller requests.As a rule of thumb, it is recommended not to add more than 6k of data to the request. /// [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] [System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AuditPolicyRule", IsNullable=false)] private class SetAuditPolicyBulk_INPUT : CimParams { public SetAuditPolicyBulk_INPUT(string ns) : base(ns) { } /// /// Required, Array of flags, each one indicates whether to enable or disable the corresponding policy event. /// [CimField(false,true)] public virtual bool[] Enable { set { List newArr = new List(); foreach (bool val in value) { newArr.Add(val.ToString(CultureInfo.InvariantCulture)); } this.SetOrAddField("Enable",newArr.ToArray()); } } /// /// Required, Array of application IDs of the policy events. /// [CimField(false,true)] public virtual ushort[] AuditedAppID { set { List newArr = new List(); foreach (ushort val in value) { newArr.Add(val.ToString(CultureInfo.InvariantCulture)); } this.SetOrAddField("AuditedAppID",newArr.ToArray()); } } /// /// Required, Array of event IDs of the policy events. /// [CimField(false,true)] public virtual ushort[] EventID { set { List newArr = new List(); foreach (ushort val in value) { newArr.Add(val.ToString(CultureInfo.InvariantCulture)); } this.SetOrAddField("EventID",newArr.ToArray()); } } /// /// Required, Array of flags, each one indicates the type of the corresponding policy event. For example: indicating if the policy is defined as critical. When the audit log is locked or full, all critical events will not be executed, and will return a failure status code. /// [CimField(false,true)] public virtual uint[] PolicyType { set { List newArr = new List(); foreach (uint val in value) { newArr.Add(val.ToString(CultureInfo.InvariantCulture)); } this.SetOrAddField("PolicyType",newArr.ToArray()); } } } /// ///This method enables or disables auditing of multiple events. ///Certain events are predefined as always logged. They are included in the audit log policy whether they were requested explicitly or not. Attempting to remove such events from the audit log policy will return an error. ///Certain events are predefined as never critical. Attempting to include such events in a policy and marking them as critical will return an error. ///If a policy event is configured more than once, the last configuration will be applied. ///If there is an error, the current audit log policy configuration will not be changed. ///If the request size is too large to be processed, divide the request into multiple smaller requests.As a rule of thumb, it is recommended not to add more than 6k of data to the request. /// [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] [System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AuditPolicyRule", IsNullable=false)] private class SetAuditPolicyBulk_OUTPUT : CimParams { public SetAuditPolicyBulk_OUTPUT() : base("") { } } /// ///This method enables or disables auditing of multiple events. ///Certain events are predefined as always logged. They are included in the audit log policy whether they were requested explicitly or not. Attempting to remove such events from the audit log policy will return an error. ///Certain events are predefined as never critical. Attempting to include such events in a policy and marking them as critical will return an error. ///If a policy event is configured more than once, the last configuration will be applied. ///If there is an error, the current audit log policy configuration will not be changed. ///If the request size is too large to be processed, divide the request into multiple smaller requests.As a rule of thumb, it is recommended not to add more than 6k of data to the request. /// /// Required, IN -Array of flags, each one indicates whether to enable or disable the corresponding policy event. /// Required, IN -Array of application IDs of the policy events. /// Required, IN -Array of event IDs of the policy events. /// Required, IN -Array of flags, each one indicates the type of the corresponding policy event. For example: indicating if the policy is defined as critical. When the audit log is locked or full, all critical events will not be executed, and will return a failure status code. /// /// Legal values: /// PT_STATUS_SUCCESS : 0 /// PT_STATUS_INTERNAL_ERROR : 1 /// PT_STATUS_NOT_READY : 2 /// PT_STATUS_NOT_PERMITTED : 16 /// PT_STATUS_INVALID_PARAMETER : 36 /// PT_STATUS_FLASH_WRITE_LIMIT_EXCEEDED : 38 /// PT_STATUS_AUDIT_FAIL : 2075 /// public virtual uint SetAuditPolicyBulk(bool[] inEnable,ushort[] inAuditedAppID,ushort[] inEventID,uint[] inPolicyType) { SetAuditPolicyBulk_INPUT input = new SetAuditPolicyBulk_INPUT(this.XmlNamespace); if (inEnable != null) input.Enable=inEnable; if (inAuditedAppID != null) input.AuditedAppID=inAuditedAppID; if (inEventID != null) input.EventID=inEventID; if (inPolicyType != null) input.PolicyType=inPolicyType; SetAuditPolicyBulk_OUTPUT output = new SetAuditPolicyBulk_OUTPUT(); uint returnValue = base.Invoke("SetAuditPolicyBulk",input,out output); return returnValue; } /// /// Enumerate instances of AMT_AuditPolicyRule class at an endpoint. /// /// WS-Management client /// Keys for selecting the instances /// Collection of AMT_AuditPolicyRule objects public static new Collection Enumerate(IWSManClient client, CimBase.CimKeys cimKeys) { List ret = CimBase.Enumerate(client, cimKeys); return new Collection(ret); } /// /// Enumerate instances of AMT_AuditPolicyRule class at an endpoint. /// /// WS-Management client /// Collection of AMT_AuditPolicyRule objects public static new Collection Enumerate(IWSManClient client) { List ret = CimBase.Enumerate(client); return new Collection(ret); } /// /// Delete the instance of AMT_AuditPolicyRule if it is singular. /// Note: This method will succeed only if a single instance of the class exists. /// /// WS-Management client public static new void Delete(IWSManClient client) { CimBase.Delete(client); } /// /// Represents the keys of the AMT_AuditPolicyRule class. /// public new class CimKeys : CIM_PolicyRule.CimKeys { } } }