521 lines
17 KiB
C#

//----------------------------------------------------------------------------
//
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
//
// File: CIM_SoftwareElement.cs
//
// Contents: The CIM_SoftwareElement class is used to decompose a CIM_SoftwareFeature object into a set of individually manageable or deployable parts, for a particular platform. A SoftwareElement's platform is uniquely identified by its underlying hardware architecture and operating system (for example Sun Solaris on Sun Sparc or Windows NT on Intel platforms). As such, to understand the details of how the functionality of a particular SoftwareFeature is provided on a particular platform, the CIM_SoftwareElement objects referenced by CIM_SoftwareFeatureSoftwareElements associations are organized in disjoint sets based on the TargetOperatingSystem property. A CIM_SoftwareElement object captures the management details of a part or component in one of four states characterized by the SoftwareElementState property.
// This file was automatically generated from CIM_SoftwareElement.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>
///The CIM_SoftwareElement class is used to decompose a CIM_SoftwareFeature object into a set of individually manageable or deployable parts, for a particular platform. A SoftwareElement's platform is uniquely identified by its underlying hardware architecture and operating system (for example Sun Solaris on Sun Sparc or Windows NT on Intel platforms). As such, to understand the details of how the functionality of a particular SoftwareFeature is provided on a particular platform, the CIM_SoftwareElement objects referenced by CIM_SoftwareFeatureSoftwareElements associations are organized in disjoint sets based on the TargetOperatingSystem property. A CIM_SoftwareElement object captures the management details of a part or component in one of four states characterized by the SoftwareElementState property.
/// </summary>
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_SoftwareElement")]
[System.Xml.Serialization.XmlRootAttribute("CIM_SoftwareElement", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_SoftwareElement", IsNullable=false)]
public class CIM_SoftwareElement : CIM_LogicalElement
{
/// <summary>
/// Default constructor.
/// </summary>
public CIM_SoftwareElement() :base()
{
}
/// <summary>
/// Constructor that recieves an xml string for deserialization.
/// </summary>
/// <param name="xml">xml string to deserialize</param>
public CIM_SoftwareElement(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_SoftwareElement(IWSManClient client): base(client)
{
}
/// <summary>
/// Remove BuildNumber field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveBuildNumber()
{
RemoveField("BuildNumber");
}
/// <summary>
/// Is true if the field BuildNumber exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool BuildNumberExist
{
get
{
return ContainsField("BuildNumber");
}
}
/// <summary>
/// Optional, The internal identifier for this compilation of SoftwareElement.
/// </summary>
[CimField(false, false)]
public virtual string BuildNumber
{
get
{
return this.GetField("BuildNumber")[0];
}
set
{
this.SetOrAddField("BuildNumber",value);
}
}
/// <summary>
/// Remove CodeSet field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveCodeSet()
{
RemoveField("CodeSet");
}
/// <summary>
/// Is true if the field CodeSet exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool CodeSetExist
{
get
{
return ContainsField("CodeSet");
}
}
/// <summary>
/// Optional, The code set used by this SoftwareElement. It defines the bit patterns that a system uses to identify characters. ISO defines various code sets such as UTF-8 and ISO8859-1.
/// </summary>
[CimField(false, false)]
public virtual string CodeSet
{
get
{
return this.GetField("CodeSet")[0];
}
set
{
this.SetOrAddField("CodeSet",value);
}
}
/// <summary>
/// Remove IdentificationCode field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveIdentificationCode()
{
RemoveField("IdentificationCode");
}
/// <summary>
/// Is true if the field IdentificationCode exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool IdentificationCodeExist
{
get
{
return ContainsField("IdentificationCode");
}
}
/// <summary>
/// Optional, The manufacturer's identifier for this SoftwareElement. Often this will be a stock keeping unit (SKU) or a part number.
/// </summary>
[CimField(false, false)]
public virtual string IdentificationCode
{
get
{
return this.GetField("IdentificationCode")[0];
}
set
{
this.SetOrAddField("IdentificationCode",value);
}
}
/// <summary>
/// Remove LanguageEdition field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveLanguageEdition()
{
RemoveField("LanguageEdition");
}
/// <summary>
/// Is true if the field LanguageEdition exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool LanguageEditionExist
{
get
{
return ContainsField("LanguageEdition");
}
}
/// <summary>
/// Optional, The value of this property identifies the language edition of this SoftwareElement. The language codes defined in ISO 639 should be used. Where the element represents a multi-lingual or international version, the string "Multilingual" should be used.
/// </summary>
[CimField(false, false)]
public virtual string LanguageEdition
{
get
{
return this.GetField("LanguageEdition")[0];
}
set
{
this.SetOrAddField("LanguageEdition",value);
}
}
/// <summary>
/// Remove Manufacturer field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveManufacturer()
{
RemoveField("Manufacturer");
}
/// <summary>
/// Is true if the field Manufacturer exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool ManufacturerExist
{
get
{
return ContainsField("Manufacturer");
}
}
/// <summary>
/// Optional, Manufacturer of this SoftwareElement.
/// </summary>
[CimField(false, false)]
public virtual string Manufacturer
{
get
{
return this.GetField("Manufacturer")[0];
}
set
{
this.SetOrAddField("Manufacturer",value);
}
}
/// <summary>
/// Key, Required, The name used to identify this SoftwareElement.
/// </summary>
[CimField(true, true)]
public override string Name
{
get
{
return this.GetField("Name")[0];
}
set
{
this.SetOrAddField("Name",value);
}
}
/// <summary>
/// Remove OtherTargetOS field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveOtherTargetOS()
{
RemoveField("OtherTargetOS");
}
/// <summary>
/// Is true if the field OtherTargetOS exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool OtherTargetOSExist
{
get
{
return ContainsField("OtherTargetOS");
}
}
/// <summary>
/// Optional, The OtherTargetOS property records the manufacturer and operating system type for a SoftwareElement when the TargetOperatingSystem property has a value of 1 ("Other"). For all other values of TargetOperatingSystem, the OtherTargetOS property is NULL.
/// </summary>
[CimField(false, false)]
public virtual string OtherTargetOS
{
get
{
return this.GetField("OtherTargetOS")[0];
}
set
{
this.SetOrAddField("OtherTargetOS",value);
}
}
/// <summary>
/// Remove SerialNumber field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveSerialNumber()
{
RemoveField("SerialNumber");
}
/// <summary>
/// Is true if the field SerialNumber exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool SerialNumberExist
{
get
{
return ContainsField("SerialNumber");
}
}
/// <summary>
/// Optional, The assigned serial number of this SoftwareElement.
/// </summary>
[CimField(false, false)]
public virtual string SerialNumber
{
get
{
return this.GetField("SerialNumber")[0];
}
set
{
this.SetOrAddField("SerialNumber",value);
}
}
/// <summary>
/// Key, Required, This is an identifier for the SoftwareElement and is designed to be used in conjunction with other keys to create a unique representation of the element.
/// </summary>
[CimField(true, true)]
public virtual string SoftwareElementID
{
get
{
return this.GetField("SoftwareElementID")[0];
}
set
{
this.SetOrAddField("SoftwareElementID",value);
}
}
/// <summary>
/// Key, Required, The SoftwareElementState is defined in this model to identify various states of a SoftwareElement's life cycle.
/// - A SoftwareElement in the deployable state describes the details necessary to successfully distribute it and the details (Checks and Actions) required to move it to the installable state (i.e, the next state).
/// - A SoftwareElement in the installable state describes the details necessary to successfully install it and the details (Checks and Actions) required to create an element in the executable state (i.e., the next state).
/// - A SoftwareElement in the executable state describes the details necessary to successfully start it and the details (Checks and Actions) required to move it to the running state (i.e., the next state).
/// - A SoftwareElement in the running state describes the details necessary to manage the started element.
/// </summary>
[CimField(true, true)]
public virtual ushort SoftwareElementState
{
get
{
return ushort.Parse(this["SoftwareElementState"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("SoftwareElementState",value.ToString(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Key, Required, The TargetOperatingSystem property specifies the element's operating system environment. The value of this property does not ensure that it is binary executable. Two other pieces of information are needed. First, the version of the OS needs to be specified using the class, CIM_OSVersion Check. The second piece of information is the architecture that the OS runs on. This information is verified using CIM_ArchitectureCheck. The combination of these constructs clearly identifies the level of OS required for a particular SoftwareElement.
/// </summary>
[CimField(true, true)]
public virtual ushort TargetOperatingSystem
{
get
{
return ushort.Parse(this["TargetOperatingSystem"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("TargetOperatingSystem",value.ToString(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Key, Required, Software Version should be in the form &lt;Major&gt;.&lt;Minor&gt;.&lt;Revision&gt; or &lt;Major&gt;.&lt;Minor&gt;&lt;letter&gt;&lt;revision&gt;.
/// </summary>
[CimField(true, true)]
public virtual string Version
{
get
{
return this.GetField("Version")[0];
}
set
{
this.SetOrAddField("Version",value);
}
}
/// <summary>
/// Enumerate instances of CIM_SoftwareElement 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_SoftwareElement objects</returns>
public static new Collection<CIM_SoftwareElement> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
{
List<CIM_SoftwareElement> ret = CimBase.Enumerate<CIM_SoftwareElement>(client, cimKeys);
return new Collection<CIM_SoftwareElement>(ret);
}
/// <summary>
/// Enumerate instances of CIM_SoftwareElement class at an endpoint.
/// </summary>
/// <param name="client">WS-Management client</param>
/// <returns>Collection of CIM_SoftwareElement objects</returns>
public static new Collection<CIM_SoftwareElement> Enumerate(IWSManClient client)
{
List<CIM_SoftwareElement> ret = CimBase.Enumerate<CIM_SoftwareElement>(client);
return new Collection<CIM_SoftwareElement>(ret);
}
/// <summary>
/// Delete the instance of CIM_SoftwareElement 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_SoftwareElement>(client);
}
/// <summary>
/// Represents the keys of the CIM_SoftwareElement class.
/// </summary>
public new class CimKeys : CIM_LogicalElement.CimKeys
{
/// <summary>
/// Key, Required, The name used to identify this SoftwareElement.
/// </summary>
public virtual string Name
{
get
{
return GetKey("Name");
}
set
{
SetOrAddKey("Name", value);
}
}
/// <summary>
/// Key, Required, This is an identifier for the SoftwareElement and is designed to be used in conjunction with other keys to create a unique representation of the element.
/// </summary>
public virtual string SoftwareElementID
{
get
{
return GetKey("SoftwareElementID");
}
set
{
SetOrAddKey("SoftwareElementID", value);
}
}
/// <summary>
/// Key, Required, The SoftwareElementState is defined in this model to identify various states of a SoftwareElement's life cycle.
/// - A SoftwareElement in the deployable state describes the details necessary to successfully distribute it and the details (Checks and Actions) required to move it to the installable state (i.e, the next state).
/// - A SoftwareElement in the installable state describes the details necessary to successfully install it and the details (Checks and Actions) required to create an element in the executable state (i.e., the next state).
/// - A SoftwareElement in the executable state describes the details necessary to successfully start it and the details (Checks and Actions) required to move it to the running state (i.e., the next state).
/// - A SoftwareElement in the running state describes the details necessary to manage the started element.
/// </summary>
public virtual ushort SoftwareElementState
{
get
{
return ushort.Parse(GetKey("SoftwareElementState"), CultureInfo.InvariantCulture);
}
set
{
SetOrAddKey("SoftwareElementState", value.ToString(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Key, Required, The TargetOperatingSystem property specifies the element's operating system environment. The value of this property does not ensure that it is binary executable. Two other pieces of information are needed. First, the version of the OS needs to be specified using the class, CIM_OSVersion Check. The second piece of information is the architecture that the OS runs on. This information is verified using CIM_ArchitectureCheck. The combination of these constructs clearly identifies the level of OS required for a particular SoftwareElement.
/// </summary>
public virtual ushort TargetOperatingSystem
{
get
{
return ushort.Parse(GetKey("TargetOperatingSystem"), CultureInfo.InvariantCulture);
}
set
{
SetOrAddKey("TargetOperatingSystem", value.ToString(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Key, Required, Software Version should be in the form &lt;Major&gt;.&lt;Minor&gt;.&lt;Revision&gt; or &lt;Major&gt;.&lt;Minor&gt;&lt;letter&gt;&lt;revision&gt;.
/// </summary>
public virtual string Version
{
get
{
return GetKey("Version");
}
set
{
SetOrAddKey("Version", value);
}
}
}
}
}