//----------------------------------------------------------------------------
//
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
//
// File: CIM_LogEntry.cs
//
// Contents: The LogEntry object can describe the definitional format for entries in a Log, or can be used to instantiate the actual entries in the Log.
// This file was automatically generated from CIM_LogEntry.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
{
///
///The LogEntry object can describe the definitional format for entries in a Log, or can be used to instantiate the actual entries in the Log.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_LogEntry")]
[System.Xml.Serialization.XmlRootAttribute("CIM_LogEntry", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_LogEntry", IsNullable=false)]
public class CIM_LogEntry : CIM_RecordForLog
{
///
/// Default constructor.
///
public CIM_LogEntry() :base()
{
}
///
/// Constructor that recieves an xml string for deserialization.
///
/// xml string to deserialize
public CIM_LogEntry(string xml): base((IWSManClient)null)
{
this.Deserialize(xml);
}
///
/// Constructor which recieves a Ws-Management client object.
///
/// Ws-Management client
public CIM_LogEntry(IWSManClient client): base(client)
{
}
///
/// Remove CreationTimeStamp field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveCreationTimeStamp()
{
RemoveField("CreationTimeStamp");
}
///
/// Is true if the field CreationTimeStamp exists in the current object,
/// otherwise is false.
///
public virtual bool CreationTimeStampExist
{
get
{
return ContainsField("CreationTimeStamp");
}
}
///
/// Optional, A LogEntry may include a timestamp for the entry.
///
[CimField(false, false)]
public virtual CimDateTime CreationTimeStamp
{
get
{
return CimDateTime.Parse(this["CreationTimeStamp"][0]);
}
set
{
this.SetOrAddField("CreationTimeStamp",value.ToString());
}
}
///
/// Key, Required, Within the scope of the instantiating Namespace, InstanceID opaquely and uniquely identifies an instance of this class. In order to ensure uniqueness within the NameSpace, the value of InstanceID SHOULD be constructed using the following 'preferred' algorithm:
/// <OrgID>:<LocalID>
/// Where <OrgID> and <LocalID> are separated by a colon ':', and where <OrgID> MUST include a copyrighted, trademarked or otherwise unique name that is owned by the business entity creating/defining the InstanceID, or is a registered ID that is assigned to the business entity by a recognized global authority (This is similar to the <Schema Name>_<Class Name> structure of Schema class names.) In addition, to ensure uniqueness <OrgID> MUST NOT contain a colon (':'). When using this algorithm, the first colon to appear in InstanceID MUST appear between <OrgID> and <LocalID>.
/// <LocalID> is chosen by the business entity and SHOULD not be re-used to identify different underlying (real-world) elements. If the above 'preferred' algorithm is not used, the defining entity MUST assure that the resultant InstanceID is not re-used across any InstanceIDs produced by this or other providers for this instance's NameSpace.
/// For DMTF defined instances, the 'preferred' algorithm MUST be used with the <OrgID> set to 'CIM'.
///
[CimField(true, true)]
public override string InstanceID
{
get
{
return this.GetField("InstanceID")[0];
}
set
{
this.SetOrAddField("InstanceID",value);
}
}
///
/// Remove LogInstanceID field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveLogInstanceID()
{
RemoveField("LogInstanceID");
}
///
/// Is true if the field LogInstanceID exists in the current object,
/// otherwise is false.
///
public virtual bool LogInstanceIDExist
{
get
{
return ContainsField("LogInstanceID");
}
}
///
/// Optional, The containing Log's InstanceID.
///
[CimField(false, false)]
public virtual string LogInstanceID
{
get
{
return this.GetField("LogInstanceID")[0];
}
set
{
this.SetOrAddField("LogInstanceID",value);
}
}
///
/// Remove LogName field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveLogName()
{
RemoveField("LogName");
}
///
/// Is true if the field LogName exists in the current object,
/// otherwise is false.
///
public virtual bool LogNameExist
{
get
{
return ContainsField("LogName");
}
}
///
/// Optional, The containing Log's Name. This property is available for backwards continuity with CIM_LogRecord.
///
[CimField(false, false)]
public virtual string LogName
{
get
{
return this.GetField("LogName")[0];
}
set
{
this.SetOrAddField("LogName",value);
}
}
///
/// Remove Message field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveMessage()
{
RemoveField("Message");
}
///
/// Is true if the field Message exists in the current object,
/// otherwise is false.
///
public virtual bool MessageExist
{
get
{
return ContainsField("Message");
}
}
///
/// Optional, The formatted message. This message is constructed by combining some or all of the dynamic elements specified in the MessageArguments property with the static elements uniquely identified by the MessageID in a message registry or other catalog associated with the OwningEntity.
///
[CimField(false, false)]
public virtual string Message
{
get
{
return this.GetField("Message")[0];
}
set
{
this.SetOrAddField("Message",value);
}
}
///
/// Remove MessageArguments field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveMessageArguments()
{
RemoveField("MessageArguments");
}
///
/// Is true if the field MessageArguments exists in the current object,
/// otherwise is false.
///
public virtual bool MessageArgumentsExist
{
get
{
return ContainsField("MessageArguments");
}
}
///
/// Optional, An array containing the dynamic content of the message.
/// Each DYNAMIC_ELEMENT for the message referred to by the MessageID property shall be contained in MessageArguments whether the DYNAMIC_ELEMENT is included in the Message or not.
/// In addition, the entries in MessageArguments need to be in the same order as the DYNAMIC_ELEMENTs.
///
[CimField(false, false)]
public virtual string[] MessageArguments
{
get
{
return CimTypesUtils.StringArrayToArray(this["MessageArguments"]);
}
set
{
string[] arr = CimTypesUtils.ArrayToStringArray(value);
this.SetOrAddField("MessageArguments", arr);
}
}
///
/// Remove MessageID field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveMessageID()
{
RemoveField("MessageID");
}
///
/// Is true if the field MessageID exists in the current object,
/// otherwise is false.
///
public virtual bool MessageIDExist
{
get
{
return ContainsField("MessageID");
}
}
///
/// Optional, A string that uniquely identifies, within the scope of the OwningEntity, the format of the Message.
///
[CimField(false, false)]
public virtual string MessageID
{
get
{
return this.GetField("MessageID")[0];
}
set
{
this.SetOrAddField("MessageID",value);
}
}
///
/// Remove OwningEntity field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveOwningEntity()
{
RemoveField("OwningEntity");
}
///
/// Is true if the field OwningEntity exists in the current object,
/// otherwise is false.
///
public virtual bool OwningEntityExist
{
get
{
return ContainsField("OwningEntity");
}
}
///
/// Optional, A string that uniquely identifies the entity that owns the definition of the format of the Message described in this instance. OwningEntity MUST include a copyrighted, trademarked or otherwise unique name that is owned by the business entity or standards body defining the format.
///
[CimField(false, false)]
public virtual string OwningEntity
{
get
{
return this.GetField("OwningEntity")[0];
}
set
{
this.SetOrAddField("OwningEntity",value);
}
}
///
/// Remove RecordID field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveRecordID()
{
RemoveField("RecordID");
}
///
/// Is true if the field RecordID exists in the current object,
/// otherwise is false.
///
public virtual bool RecordIDExist
{
get
{
return ContainsField("RecordID");
}
}
///
/// Optional, RecordID may be used to provide a representation of log entry ordering or pointers/handles for log entries.
///
[CimField(false, false)]
public virtual string RecordID
{
get
{
return this.GetField("RecordID")[0];
}
set
{
this.SetOrAddField("RecordID",value);
}
}
///
/// Enumerate instances of CIM_LogEntry class at an endpoint.
///
/// WS-Management client
/// Keys for selecting the instances
/// Collection of CIM_LogEntry 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_LogEntry class at an endpoint.
///
/// WS-Management client
/// Collection of CIM_LogEntry objects
public static new Collection Enumerate(IWSManClient client)
{
List ret = CimBase.Enumerate(client);
return new Collection(ret);
}
///
/// Delete the instance of CIM_LogEntry 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_LogEntry class.
///
public new class CimKeys : CIM_RecordForLog.CimKeys
{
///
/// Key, Required, Within the scope of the instantiating Namespace, InstanceID opaquely and uniquely identifies an instance of this class. In order to ensure uniqueness within the NameSpace, the value of InstanceID SHOULD be constructed using the following 'preferred' algorithm:
/// <OrgID>:<LocalID>
/// Where <OrgID> and <LocalID> are separated by a colon ':', and where <OrgID> MUST include a copyrighted, trademarked or otherwise unique name that is owned by the business entity creating/defining the InstanceID, or is a registered ID that is assigned to the business entity by a recognized global authority (This is similar to the <Schema Name>_<Class Name> structure of Schema class names.) In addition, to ensure uniqueness <OrgID> MUST NOT contain a colon (':'). When using this algorithm, the first colon to appear in InstanceID MUST appear between <OrgID> and <LocalID>.
/// <LocalID> is chosen by the business entity and SHOULD not be re-used to identify different underlying (real-world) elements. If the above 'preferred' algorithm is not used, the defining entity MUST assure that the resultant InstanceID is not re-used across any InstanceIDs produced by this or other providers for this instance's NameSpace.
/// For DMTF defined instances, the 'preferred' algorithm MUST be used with the <OrgID> set to 'CIM'.
///
public virtual string InstanceID
{
get
{
return GetKey("InstanceID");
}
set
{
SetOrAddKey("InstanceID", value);
}
}
}
}
}