672 lines
20 KiB
C#
672 lines
20 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: CIM_PhysicalElement.cs
|
|
//
|
|
// Contents: Subclasses of CIM_PhysicalElement define any component of a System that has a distinct physical identity. Instances of this class can be defined as an object that can be seen or touched. All Processes, Files, and LogicalDevices are considered not to be Physical Elements. For example, it is not possible to touch the functionality of a 'modem.' You can touch only the card or package that implements the modem. The same card could also implement a LAN adapter. PhysicalElements are tangible ManagedSystemElements that have a physical manifestation of some sort.
|
|
//
|
|
// Note that the properties of PhysicalElement describe a hardware entity. Possible replacement (FRU) information is defined by following the ElementFRU association to one or more instances of the ReplacementFRU class. This definition allows a client to determine what hardware can be replaced (FRUed) and what 'spare' parts might be required by a customer or engineer doing the replacement. If it can be instrumented or manually determined that an element actually replaced (FRUed) another, then this can be described in the model using the ElementHasBeenFRUed association.
|
|
// This file was automatically generated from CIM_PhysicalElement.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>
|
|
///Subclasses of CIM_PhysicalElement define any component of a System that has a distinct physical identity. Instances of this class can be defined as an object that can be seen or touched. All Processes, Files, and LogicalDevices are considered not to be Physical Elements. For example, it is not possible to touch the functionality of a 'modem.' You can touch only the card or package that implements the modem. The same card could also implement a LAN adapter. PhysicalElements are tangible ManagedSystemElements that have a physical manifestation of some sort.
|
|
///Note that the properties of PhysicalElement describe a hardware entity. Possible replacement (FRU) information is defined by following the ElementFRU association to one or more instances of the ReplacementFRU class. This definition allows a client to determine what hardware can be replaced (FRUed) and what 'spare' parts might be required by a customer or engineer doing the replacement. If it can be instrumented or manually determined that an element actually replaced (FRUed) another, then this can be described in the model using the ElementHasBeenFRUed association.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PhysicalElement")]
|
|
[System.Xml.Serialization.XmlRootAttribute("CIM_PhysicalElement", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PhysicalElement", IsNullable=false)]
|
|
public class CIM_PhysicalElement : CIM_ManagedSystemElement
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public CIM_PhysicalElement() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public CIM_PhysicalElement(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_PhysicalElement(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Remove CanBeFRUed field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveCanBeFRUed()
|
|
{
|
|
RemoveField("CanBeFRUed");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field CanBeFRUed exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool CanBeFRUedExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("CanBeFRUed");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Boolean that indicates whether this PhysicalElement can be FRUed (TRUE) or not (FALSE).
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual bool CanBeFRUed
|
|
{
|
|
get
|
|
{
|
|
return bool.Parse(this["CanBeFRUed"][0]);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("CanBeFRUed",value.ToString().ToLower(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, CreationClassName indicates the name of the class or the subclass used in the creation of an instance. When used with the other key properties of this class, this property allows all instances of this class and its subclasses to be uniquely identified.
|
|
/// </summary>
|
|
[CimField(true, true)]
|
|
public virtual string CreationClassName
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("CreationClassName")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("CreationClassName",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove Description field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public override void RemoveDescription()
|
|
{
|
|
RemoveField("Description");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field Description exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public override bool DescriptionExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("Description");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, A textual description of the PhysicalElement.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public override string Description
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("Description")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Description",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove ElementName field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public override void RemoveElementName()
|
|
{
|
|
RemoveField("ElementName");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field ElementName exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public override bool ElementNameExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("ElementName");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional,
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public override string ElementName
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("ElementName")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("ElementName",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove ManufactureDate field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveManufactureDate()
|
|
{
|
|
RemoveField("ManufactureDate");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field ManufactureDate exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool ManufactureDateExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("ManufactureDate");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The date that this PhysicalElement was manufactured.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual CimDateTime ManufactureDate
|
|
{
|
|
get
|
|
{
|
|
return CimDateTime.Parse(this["ManufactureDate"][0]);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("ManufactureDate",value.ToString());
|
|
}
|
|
}
|
|
/// <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, The name of the organization responsible for producing the PhysicalElement. This organization might be the entity from whom the Element is purchased, but this is not necessarily true. The latter information is contained in the Vendor property of CIM_Product.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string Manufacturer
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("Manufacturer")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Manufacturer",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove Model field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveModel()
|
|
{
|
|
RemoveField("Model");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field Model exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool ModelExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("Model");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The name by which the PhysicalElement is generally known.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string Model
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("Model")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Model",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove OtherIdentifyingInfo field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveOtherIdentifyingInfo()
|
|
{
|
|
RemoveField("OtherIdentifyingInfo");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field OtherIdentifyingInfo exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool OtherIdentifyingInfoExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("OtherIdentifyingInfo");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, OtherIdentifyingInfo captures data in addition to Tag information. This information could be used to identify a Physical Element. One example is bar code data associated with an Element that also has an asset tag. Note that if only bar code data is available and is unique or able to be used as an Element key, this property would be null and the bar code data would be used as the class key, in the Tag property.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string OtherIdentifyingInfo
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("OtherIdentifyingInfo")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("OtherIdentifyingInfo",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove PartNumber field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemovePartNumber()
|
|
{
|
|
RemoveField("PartNumber");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field PartNumber exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool PartNumberExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("PartNumber");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The part number assigned by the organization that is responsible for producing or manufacturing the PhysicalElement.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string PartNumber
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("PartNumber")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("PartNumber",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove PoweredOn field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemovePoweredOn()
|
|
{
|
|
RemoveField("PoweredOn");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field PoweredOn exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool PoweredOnExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("PoweredOn");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Boolean that indicates whether the PhysicalElement is powered on (TRUE) or is currently off (FALSE).
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual bool PoweredOn
|
|
{
|
|
get
|
|
{
|
|
return bool.Parse(this["PoweredOn"][0]);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("PoweredOn",value.ToString().ToLower(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove SKU field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveSKU()
|
|
{
|
|
RemoveField("SKU");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field SKU exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool SKUExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("SKU");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The stock-keeping unit number for this PhysicalElement.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string SKU
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("SKU")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("SKU",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, A manufacturer-allocated number used to identify the Physical Element.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string SerialNumber
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("SerialNumber")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("SerialNumber",value);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, An arbitrary string that uniquely identifies the Physical Element and serves as the key of the Element. The Tag property can contain information such as asset tag or serial number data. The key for PhysicalElement is placed very high in the object hierarchy in order to independently identify the hardware or entity, regardless of physical placement in or on Cabinets, Adapters, and so on. For example, a hotswappable or removable component can be taken from its containing (scoping) Package and be temporarily unused. The object still continues to exist and can even be inserted into a different scoping container. Therefore, the key for Physical Element is an arbitrary string and is defined independently of any placement or location-oriented hierarchy.
|
|
/// </summary>
|
|
[CimField(true, true)]
|
|
public virtual string Tag
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("Tag")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Tag",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove UserTracking field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveUserTracking()
|
|
{
|
|
RemoveField("UserTracking");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field UserTracking exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool UserTrackingExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("UserTracking");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, User-assigned and writeable asset-tracking identifier for the PhysicalElement.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string UserTracking
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("UserTracking")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("UserTracking",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove VendorEquipmentType field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveVendorEquipmentType()
|
|
{
|
|
RemoveField("VendorEquipmentType");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field VendorEquipmentType exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool VendorEquipmentTypeExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("VendorEquipmentType");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, A vendor-specific hardware type for the PhysicalElement. It describes the specific equipment type for the element, as defined by the vendor or manufacturer.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string VendorEquipmentType
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("VendorEquipmentType")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("VendorEquipmentType",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove Version field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveVersion()
|
|
{
|
|
RemoveField("Version");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field Version exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool VersionExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("Version");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, A string that indicates the version of the PhysicalElement.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string Version
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("Version")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Version",value);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_PhysicalElement 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_PhysicalElement objects</returns>
|
|
public static new Collection<CIM_PhysicalElement> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<CIM_PhysicalElement> ret = CimBase.Enumerate<CIM_PhysicalElement>(client, cimKeys);
|
|
return new Collection<CIM_PhysicalElement>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_PhysicalElement class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of CIM_PhysicalElement objects</returns>
|
|
public static new Collection<CIM_PhysicalElement> Enumerate(IWSManClient client)
|
|
{
|
|
List<CIM_PhysicalElement> ret = CimBase.Enumerate<CIM_PhysicalElement>(client);
|
|
return new Collection<CIM_PhysicalElement>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of CIM_PhysicalElement 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_PhysicalElement>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the CIM_PhysicalElement class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CIM_ManagedSystemElement.CimKeys
|
|
{
|
|
/// <summary>
|
|
/// Key, Required, CreationClassName indicates the name of the class or the subclass used in the creation of an instance. When used with the other key properties of this class, this property allows all instances of this class and its subclasses to be uniquely identified.
|
|
/// </summary>
|
|
|
|
public virtual string CreationClassName
|
|
{
|
|
get
|
|
{
|
|
return GetKey("CreationClassName");
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("CreationClassName", value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Key, Required, An arbitrary string that uniquely identifies the Physical Element and serves as the key of the Element. The Tag property can contain information such as asset tag or serial number data. The key for PhysicalElement is placed very high in the object hierarchy in order to independently identify the hardware or entity, regardless of physical placement in or on Cabinets, Adapters, and so on. For example, a hotswappable or removable component can be taken from its containing (scoping) Package and be temporarily unused. The object still continues to exist and can even be inserted into a different scoping container. Therefore, the key for Physical Element is an arbitrary string and is defined independently of any placement or location-oriented hierarchy.
|
|
/// </summary>
|
|
|
|
public virtual string Tag
|
|
{
|
|
get
|
|
{
|
|
return GetKey("Tag");
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("Tag", value);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|