//---------------------------------------------------------------------------- // // Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved. // // File: CIM_Log.cs // // Contents: Log represents any type of event, error or informational register or chronicle. The object describes the existence of the log and its characteristics. Log does not dictate the form of the data represented or how records/messages are stored in the log and/or accessed. Subclasses will define the appropriate methods and behavior. // This file was automatically generated from CIM_Log.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 { /// ///Log represents any type of event, error or informational register or chronicle. The object describes the existence of the log and its characteristics. Log does not dictate the form of the data represented or how records/messages are stored in the log and/or accessed. Subclasses will define the appropriate methods and behavior. /// [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Log")] [System.Xml.Serialization.XmlRootAttribute("CIM_Log", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Log", IsNullable=false)] public class CIM_Log : CIM_EnabledLogicalElement { /// /// Default constructor. /// public CIM_Log() :base() { } /// /// Constructor that recieves an xml string for deserialization. /// /// xml string to deserialize public CIM_Log(string xml): base((IWSManClient)null) { this.Deserialize(xml); } /// /// Constructor which recieves a Ws-Management client object. /// /// Ws-Management client public CIM_Log(IWSManClient client): base(client) { } /// /// Remove CurrentNumberOfRecords field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveCurrentNumberOfRecords() { RemoveField("CurrentNumberOfRecords"); } /// /// Is true if the field CurrentNumberOfRecords exists in the current object, /// otherwise is false. /// public virtual bool CurrentNumberOfRecordsExist { get { return ContainsField("CurrentNumberOfRecords"); } } /// /// Optional, Current number of records in the Log. /// [CimField(false, false)] public virtual ulong CurrentNumberOfRecords { get { return ulong.Parse(this["CurrentNumberOfRecords"][0], CultureInfo.InvariantCulture); } set { this.SetOrAddField("CurrentNumberOfRecords",value.ToString(CultureInfo.InvariantCulture)); } } /// /// Remove LogState field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveLogState() { RemoveField("LogState"); } /// /// Is true if the field LogState exists in the current object, /// otherwise is false. /// public virtual bool LogStateExist { get { return ContainsField("LogState"); } } /// /// Optional, LogState is an integer enumeration that indicates the current state of a log represented by CIM_Log subclasses. LogState is to be used in conjunction with the EnabledState property to fully describe the current state of the log. The following text briefly summarizes the various log states: /// Unknown (0) indicates the state of the log is unknown. /// Normal (2) indicates that the log is or could be executing logging commands, will process any queued log entries, and will queue new logging requests. /// Erasing (3) indicates that the log is being erased. /// Not Applicable (4) indicates the log does not support representing a log state. /// [CimField(false, false)] public virtual ushort LogState { get { return ushort.Parse(this["LogState"][0], CultureInfo.InvariantCulture); } set { this.SetOrAddField("LogState",value.ToString(CultureInfo.InvariantCulture)); } } /// /// Remove MaxNumberOfRecords field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveMaxNumberOfRecords() { RemoveField("MaxNumberOfRecords"); } /// /// Is true if the field MaxNumberOfRecords exists in the current object, /// otherwise is false. /// public virtual bool MaxNumberOfRecordsExist { get { return ContainsField("MaxNumberOfRecords"); } } /// /// Optional, Maximum number of records that can be captured in the Log. If undefined, a value of zero should be specified. /// [CimField(false, false)] public virtual ulong MaxNumberOfRecords { get { return ulong.Parse(this["MaxNumberOfRecords"][0], CultureInfo.InvariantCulture); } set { this.SetOrAddField("MaxNumberOfRecords",value.ToString(CultureInfo.InvariantCulture)); } } /// /// Remove OverwritePolicy field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveOverwritePolicy() { RemoveField("OverwritePolicy"); } /// /// Is true if the field OverwritePolicy exists in the current object, /// otherwise is false. /// public virtual bool OverwritePolicyExist { get { return ContainsField("OverwritePolicy"); } } /// /// Optional, OverwritePolicy is an integer enumeration that indicates whether the log, represented by the CIM_Log subclasses, can overwrite its entries.Unknown (0) indicates the log's overwrite policy is unknown. /// Wraps when Full (2) indicates that the log overwrites its entries with new entries when the log has reached its maximum capacity. /// Never Overwrites (7) indicates that the log never overwrites its entries by the new entries. /// [CimField(false, false)] public virtual ushort OverwritePolicy { get { return ushort.Parse(this["OverwritePolicy"][0], CultureInfo.InvariantCulture); } set { this.SetOrAddField("OverwritePolicy",value.ToString(CultureInfo.InvariantCulture)); } } /// ///Requests that the Log be cleared of all entries. ///The return value should be 0 if the request was successfully executed, 1 if the request is not supported, and some other value, as indicated by the ValueMap/Values qualifiers, if an error occurred. /// [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] [System.Xml.Serialization.XmlRootAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Log", IsNullable=false)] private class ClearLog_INPUT : CimParams { public ClearLog_INPUT(string ns) : base(ns) { } } /// ///Requests that the Log be cleared of all entries. ///The return value should be 0 if the request was successfully executed, 1 if the request is not supported, and some other value, as indicated by the ValueMap/Values qualifiers, if an error occurred. /// [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] [System.Xml.Serialization.XmlRootAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Log", IsNullable=false)] private class ClearLog_OUTPUT : CimParams { public ClearLog_OUTPUT() : base("") { } } /// ///Requests that the Log be cleared of all entries. ///The return value should be 0 if the request was successfully executed, 1 if the request is not supported, and some other value, as indicated by the ValueMap/Values qualifiers, if an error occurred. /// /// /// Legal values: /// Completed with no error : 0 /// Not Supported : 1 /// Unspecified Error : 2 /// Timeout : 3 /// Failed : 4 /// Invalid Parameter : 5 /// DMTF_Reserved : 6..0x0FFF /// Method_Reserved : 0x1000..0x7FFF /// Vendor_Reserved : 0x8000.. /// public virtual uint ClearLog() { ClearLog_INPUT input = new ClearLog_INPUT(this.XmlNamespace); ClearLog_OUTPUT output = new ClearLog_OUTPUT(); uint returnValue = base.Invoke("ClearLog",input,out output); return returnValue; } /// /// Enumerate instances of CIM_Log class at an endpoint. /// /// WS-Management client /// Keys for selecting the instances /// Collection of CIM_Log objects public static new Collection Enumerate(IWSManClient client, CimBase.CimKeys cimKeys) { List ret = CimBase.Enumerate(client, cimKeys); return new Collection(ret); } /// /// Enumerate instances of CIM_Log class at an endpoint. /// /// WS-Management client /// Collection of CIM_Log objects public static new Collection Enumerate(IWSManClient client) { List ret = CimBase.Enumerate(client); return new Collection(ret); } /// /// Delete the instance of CIM_Log 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 CIM_Log class. /// public new class CimKeys : CIM_EnabledLogicalElement.CimKeys { } } }