//----------------------------------------------------------------------------
//
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
//
// File: CIM_ElementSettingData.cs
//
// Contents: ElementSettingData represents the association between ManagedElements and applicable setting data. This association also describes whether this is a default or current setting.
// This file was automatically generated from CIM_ElementSettingData.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
{
///
///ElementSettingData represents the association between ManagedElements and applicable setting data. This association also describes whether this is a default or current setting.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ElementSettingData")]
[System.Xml.Serialization.XmlRootAttribute("CIM_ElementSettingData", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ElementSettingData", IsNullable=false)]
public class CIM_ElementSettingData : CimBase
{
///
/// Default constructor.
///
public CIM_ElementSettingData() :base()
{
}
///
/// Constructor that recieves an xml string for deserialization.
///
/// xml string to deserialize
public CIM_ElementSettingData(string xml): base((IWSManClient)null)
{
this.Deserialize(xml);
}
///
/// Constructor which recieves a Ws-Management client object.
///
/// Ws-Management client
public CIM_ElementSettingData(IWSManClient client): base(client)
{
}
///
/// Remove IsCurrent field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveIsCurrent()
{
RemoveField("IsCurrent");
}
///
/// Is true if the field IsCurrent exists in the current object,
/// otherwise is false.
///
public virtual bool IsCurrentExist
{
get
{
return ContainsField("IsCurrent");
}
}
///
/// Optional, An enumerated integer indicating that the referenced setting is currently being used in the operation of the element, or that this information is unknown.
///
[CimField(false, false)]
public virtual ushort IsCurrent
{
get
{
return ushort.Parse(this["IsCurrent"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("IsCurrent",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Remove IsDefault field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveIsDefault()
{
RemoveField("IsDefault");
}
///
/// Is true if the field IsDefault exists in the current object,
/// otherwise is false.
///
public virtual bool IsDefaultExist
{
get
{
return ContainsField("IsDefault");
}
}
///
/// Optional, An enumerated integer indicating that the referenced setting is a default setting for the element, or that this information is unknown.
///
[CimField(false, false)]
public virtual ushort IsDefault
{
get
{
return ushort.Parse(this["IsDefault"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("IsDefault",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Remove IsNext field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveIsNext()
{
RemoveField("IsNext");
}
///
/// Is true if the field IsNext exists in the current object,
/// otherwise is false.
///
public virtual bool IsNextExist
{
get
{
return ContainsField("IsNext");
}
}
///
/// Optional, An enumerated integer indicating whether or not the referenced setting is the next setting to be applied. For example, the application could take place on a re-initialization, reset, reconfiguration request. This could be a permanent setting, or a setting used only one time, as indicated by the flag. If it is a permanent setting then the setting is applied every time the managed element reinitializes, until this flag is manually reset. However, if it is single use, then the flag is automatically cleared after the settings are applied. Also note that if this flag is specified (i.e. set to value other than "Unknown"), then this takes precedence over any SettingData that may have been specified as Default. For example: If the managed element is a computer system, and the value of this flag is "Is Next", then the setting will be effective next time the system resets. And, unless this flag is changed, it will persist for subsequent system resets. However, if this flag is set to "Is Next For Single Use", then this setting will only be used once and the flag would be reset after that to "Is Not Next". So, in the above example, if the system reboots in a quick succession, the setting will not be used at the second reboot.
///
[CimField(false, false)]
public virtual ushort IsNext
{
get
{
return ushort.Parse(this["IsNext"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("IsNext",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Key, Required, The managed element.
///
[CimField(true, false)]
public virtual CimReference ManagedElement
{
get
{
string innerXML = this.GetField("ManagedElement")[0];
CimReference epr = new CimReference("ManagedElement", XmlNamespace, innerXML);
return epr;
}
set
{
this.SetOrAddField("ManagedElement",value.Serialize(false));
}
}
///
/// Key, Required, The SettingData object associated with the element.
///
[CimField(true, false)]
public virtual CimReference SettingData
{
get
{
string innerXML = this.GetField("SettingData")[0];
CimReference epr = new CimReference("SettingData", XmlNamespace, innerXML);
return epr;
}
set
{
this.SetOrAddField("SettingData",value.Serialize(false));
}
}
///
/// Enumerate instances of CIM_ElementSettingData class at an endpoint.
///
/// WS-Management client
/// Keys for selecting the instances
/// Collection of CIM_ElementSettingData objects
public static Collection Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
{
List ret = CimBase.Enumerate(client, cimKeys);
return new Collection(ret);
}
///
/// Enumerate instances of CIM_ElementSettingData class at an endpoint.
///
/// WS-Management client
/// Collection of CIM_ElementSettingData objects
public static Collection Enumerate(IWSManClient client)
{
List ret = CimBase.Enumerate(client);
return new Collection(ret);
}
///
/// Delete the instance of CIM_ElementSettingData if it is singular.
/// Note: This method will succeed only if a single instance of the class exists.
///
/// WS-Management client
public static void Delete(IWSManClient client)
{
CimBase.Delete(client);
}
///
/// Represents the keys of the CIM_ElementSettingData class.
///
public new class CimKeys : CimBase.CimKeys
{
///
/// Key, Required, The managed element.
///
public virtual CimReference ManagedElement
{
get
{
string innerXML = GetKey("ManagedElement");
CimReference epr = new CimReference("ManagedElement", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ElementSettingData", innerXML);
return epr;
}
set
{
SetOrAddKey("ManagedElement", value);
}
}
///
/// Key, Required, The SettingData object associated with the element.
///
public virtual CimReference SettingData
{
get
{
string innerXML = GetKey("SettingData");
CimReference epr = new CimReference("SettingData", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ElementSettingData", innerXML);
return epr;
}
set
{
SetOrAddKey("SettingData", value);
}
}
}
}
}