//---------------------------------------------------------------------------- // // 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 { /// ///ElementSoftwareIdentity allows a Managed Element to report its software related asset information (firmware, drivers, configuration software, and etc.) /// [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 { /// /// Default constructor. /// public CIM_ElementSoftwareIdentity() :base() { } /// /// Constructor that recieves an xml string for deserialization. /// /// xml string to deserialize public CIM_ElementSoftwareIdentity(string xml): base((IWSManClient)null) { this.Deserialize(xml); } /// /// Constructor which recieves a Ws-Management client object. /// /// Ws-Management client public CIM_ElementSoftwareIdentity(IWSManClient client): base(client) { } /// /// Required, A LogicalElement's Software Asset. /// [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)); } } /// /// Required, The ManagedElement that requires or uses the software. /// [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)); } } /// /// Remove ElementSoftwareStatus field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveElementSoftwareStatus() { RemoveField("ElementSoftwareStatus"); } /// /// Is true if the field ElementSoftwareStatus exists in the current object, /// otherwise is false. /// public virtual bool ElementSoftwareStatusExist { get { return ContainsField("ElementSoftwareStatus"); } } /// /// 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. /// [CimField(false, false)] public virtual ushort[] ElementSoftwareStatus { get { return CimTypesUtils.StringArrayToArray(this["ElementSoftwareStatus"]); } set { string[] arr = CimTypesUtils.ArrayToStringArray(value); this.SetOrAddField("ElementSoftwareStatus", arr); } } /// /// Remove OtherUpgradeCondition field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveOtherUpgradeCondition() { RemoveField("OtherUpgradeCondition"); } /// /// Is true if the field OtherUpgradeCondition exists in the current object, /// otherwise is false. /// public virtual bool OtherUpgradeConditionExist { get { return ContainsField("OtherUpgradeCondition"); } } /// /// Optional, Describes the upgrade condition, when UpgradeCondition is set to 1 ("Other"). /// [CimField(false, false)] public virtual string OtherUpgradeCondition { get { return this.GetField("OtherUpgradeCondition")[0]; } set { this.SetOrAddField("OtherUpgradeCondition",value); } } /// /// Remove UpgradeCondition field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveUpgradeCondition() { RemoveField("UpgradeCondition"); } /// /// Is true if the field UpgradeCondition exists in the current object, /// otherwise is false. /// public virtual bool UpgradeConditionExist { get { return ContainsField("UpgradeCondition"); } } /// /// 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. /// [CimField(false, false)] public virtual ushort UpgradeCondition { get { return ushort.Parse(this["UpgradeCondition"][0], CultureInfo.InvariantCulture); } set { this.SetOrAddField("UpgradeCondition",value.ToString(CultureInfo.InvariantCulture)); } } /// /// Enumerate instances of CIM_ElementSoftwareIdentity class at an endpoint. /// /// WS-Management client /// Keys for selecting the instances /// Collection of CIM_ElementSoftwareIdentity 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_ElementSoftwareIdentity class at an endpoint. /// /// WS-Management client /// Collection of CIM_ElementSoftwareIdentity objects public static new Collection Enumerate(IWSManClient client) { List ret = CimBase.Enumerate(client); return new Collection(ret); } /// /// Delete the instance of CIM_ElementSoftwareIdentity 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_ElementSoftwareIdentity class. /// public new class CimKeys : CIM_Dependency.CimKeys { /// /// Required, A LogicalElement's Software Asset. /// 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); } } /// /// Required, The ManagedElement that requires or uses the software. /// 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); } } } } }