294 lines
9.7 KiB
C#
294 lines
9.7 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: CIM_ElementSoftwareIdentity.cs
|
|
//
|
|
// Contents: ElementSoftwareIdentity allows a Managed Element to report its software related asset information (firmware, drivers, configuration software, and etc.)
|
|
// This file was automatically generated from CIM_ElementSoftwareIdentity.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
|
|
{
|
|
/// <summary>
|
|
///ElementSoftwareIdentity allows a Managed Element to report its software related asset information (firmware, drivers, configuration software, and etc.)
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ElementSoftwareIdentity")]
|
|
[System.Xml.Serialization.XmlRootAttribute("CIM_ElementSoftwareIdentity", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ElementSoftwareIdentity", IsNullable=false)]
|
|
public class CIM_ElementSoftwareIdentity : CIM_Dependency
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public CIM_ElementSoftwareIdentity() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public CIM_ElementSoftwareIdentity(string xml): base((IWSManClient)null)
|
|
{
|
|
this.Deserialize(xml);
|
|
}
|
|
/// <summary>
|
|
/// Constructor which recieves a Ws-Management client object.
|
|
/// </summary>
|
|
/// <param name="client">Ws-Management client</param>
|
|
public CIM_ElementSoftwareIdentity(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Required, A LogicalElement's Software Asset.
|
|
/// </summary>
|
|
[CimField(true, false)]
|
|
public override CimReference Antecedent
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("Antecedent")[0];
|
|
CimReference epr = new CimReference("Antecedent", XmlNamespace, innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Antecedent",value.Serialize(false));
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Required, The ManagedElement that requires or uses the software.
|
|
/// </summary>
|
|
[CimField(true, false)]
|
|
public override CimReference Dependent
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("Dependent")[0];
|
|
CimReference epr = new CimReference("Dependent", XmlNamespace, innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Dependent",value.Serialize(false));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove ElementSoftwareStatus field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveElementSoftwareStatus()
|
|
{
|
|
RemoveField("ElementSoftwareStatus");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field ElementSoftwareStatus exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool ElementSoftwareStatusExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("ElementSoftwareStatus");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, A collection of properties describing the status of the software on the managed element. Multiple properties could be set at the same time. For example a ElementSoftwareStatus could have "Installed", "Default", "Current" and "FallBack" set at the same time.
|
|
/// "Current" indicates that the software is currently running on or for the Managed Element.
|
|
/// "Next" indicates that the software will run after the next reset or reboot unless superseded by a software with a status of "SingleUse".
|
|
/// "FallBack" indicates that the software will be run if the software which has a status of "Next" or "SingleUse" fails to run.
|
|
/// "Default" indicates the default version of the software that was originally shipped by the manufacturer.
|
|
/// "Installed" indicates that the software is persistently located and is available for use on the Managed Element.
|
|
/// "SingleUse" indicates that the software will run only after the next reset or reboot but will not run after the subsequent reset or reboot.
|
|
/// "Available" indicates that the software is available for installation on the Managed Element.
|
|
/// "Supports"indicates that the software will work with or operate the Managed Element but is or will be installed on a different Managed Element.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ushort[] ElementSoftwareStatus
|
|
{
|
|
get
|
|
{
|
|
return CimTypesUtils.StringArrayToArray<ushort>(this["ElementSoftwareStatus"]);
|
|
}
|
|
set
|
|
{
|
|
string[] arr = CimTypesUtils.ArrayToStringArray<ushort>(value);
|
|
this.SetOrAddField("ElementSoftwareStatus", arr);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove OtherUpgradeCondition field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveOtherUpgradeCondition()
|
|
{
|
|
RemoveField("OtherUpgradeCondition");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field OtherUpgradeCondition exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool OtherUpgradeConditionExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("OtherUpgradeCondition");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Describes the upgrade condition, when UpgradeCondition is set to 1 ("Other").
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string OtherUpgradeCondition
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("OtherUpgradeCondition")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("OtherUpgradeCondition",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove UpgradeCondition field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveUpgradeCondition()
|
|
{
|
|
RemoveField("UpgradeCondition");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field UpgradeCondition exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool UpgradeConditionExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("UpgradeCondition");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Indicates the element's ability to upgrade this software asset.
|
|
/// 'Resides off element'(2), indicates the persistence of the software is outside of the element. Typically for a element this software is part of the OperatingSystem is typically upgradeable.
|
|
/// 'Owner Upgradeable' (3), indicates the persistence of the software is on the element and is upgradeable by the owner.
|
|
/// 'FactoryUpgradeable' (4),indicates the persistence of the software is on the element and is upgradeable by the manufacturer.
|
|
/// 'Not Upgradeable' (5), indicates the presistence of the software is on the element and is not upgradeable. (i.e. burned into a non replaceable ROM chip.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ushort UpgradeCondition
|
|
{
|
|
get
|
|
{
|
|
return ushort.Parse(this["UpgradeCondition"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("UpgradeCondition",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_ElementSoftwareIdentity class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <param name="cimKeys">Keys for selecting the instances</param>
|
|
/// <returns>Collection of CIM_ElementSoftwareIdentity objects</returns>
|
|
public static new Collection<CIM_ElementSoftwareIdentity> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<CIM_ElementSoftwareIdentity> ret = CimBase.Enumerate<CIM_ElementSoftwareIdentity>(client, cimKeys);
|
|
return new Collection<CIM_ElementSoftwareIdentity>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_ElementSoftwareIdentity class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of CIM_ElementSoftwareIdentity objects</returns>
|
|
public static new Collection<CIM_ElementSoftwareIdentity> Enumerate(IWSManClient client)
|
|
{
|
|
List<CIM_ElementSoftwareIdentity> ret = CimBase.Enumerate<CIM_ElementSoftwareIdentity>(client);
|
|
return new Collection<CIM_ElementSoftwareIdentity>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of CIM_ElementSoftwareIdentity if it is singular.
|
|
/// Note: This method will succeed only if a single instance of the class exists.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
public static new void Delete(IWSManClient client)
|
|
{
|
|
CimBase.Delete<CIM_ElementSoftwareIdentity>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the CIM_ElementSoftwareIdentity class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CIM_Dependency.CimKeys
|
|
{
|
|
/// <summary>
|
|
/// Required, A LogicalElement's Software Asset.
|
|
/// </summary>
|
|
|
|
public virtual CimReference Antecedent
|
|
{
|
|
get
|
|
{
|
|
string innerXML = GetKey("Antecedent");
|
|
CimReference epr = new CimReference("Antecedent", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ElementSoftwareIdentity", innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("Antecedent", value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Required, The ManagedElement that requires or uses the software.
|
|
/// </summary>
|
|
|
|
public virtual CimReference Dependent
|
|
{
|
|
get
|
|
{
|
|
string innerXML = GetKey("Dependent");
|
|
CimReference epr = new CimReference("Dependent", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ElementSoftwareIdentity", innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("Dependent", value);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|