175 lines
6.7 KiB
C#
175 lines
6.7 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: CIM_SystemComponent.cs
|
|
//
|
|
// Contents: CIM_SystemComponent is a specialization of the CIM_Component association that establishes 'part of' relationships between a System and any ManagedSystemElements of which it is composed.
|
|
// Use this association with caution when using it instead of a subclass such as SystemDevice or a peer association such as HostedService. This class is very broadly defined, which can lead to erroneous use. For example, Access Points that are dependent on (and hosted on) a System are NOT Components of the System. The System is not made up of any AccessPoint 'parts', which is why a Dependency association, HostedAccessPoint, was defined. Similarly, a PhysicalPackage is not a 'part' of a System, because the physical element exists independently of any internal components, software, and so on. In fact, again, a Dependency relationship is true where a ComputerSystem is Dependent on its packaging, as described by the ComputerSystemPackage association.
|
|
// This file was automatically generated from CIM_SystemComponent.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>
|
|
///CIM_SystemComponent is a specialization of the CIM_Component association that establishes 'part of' relationships between a System and any ManagedSystemElements of which it is composed.
|
|
///Use this association with caution when using it instead of a subclass such as SystemDevice or a peer association such as HostedService. This class is very broadly defined, which can lead to erroneous use. For example, Access Points that are dependent on (and hosted on) a System are NOT Components of the System. The System is not made up of any AccessPoint 'parts', which is why a Dependency association, HostedAccessPoint, was defined. Similarly, a PhysicalPackage is not a 'part' of a System, because the physical element exists independently of any internal components, software, and so on. In fact, again, a Dependency relationship is true where a ComputerSystem is Dependent on its packaging, as described by the ComputerSystemPackage association.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_SystemComponent")]
|
|
[System.Xml.Serialization.XmlRootAttribute("CIM_SystemComponent", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_SystemComponent", IsNullable=false)]
|
|
public class CIM_SystemComponent : CIM_Component
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public CIM_SystemComponent() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public CIM_SystemComponent(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_SystemComponent(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Required, The parent System in the Association.
|
|
/// </summary>
|
|
[CimField(true, false)]
|
|
public override CimReference GroupComponent
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("GroupComponent")[0];
|
|
CimReference epr = new CimReference("GroupComponent", XmlNamespace, innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("GroupComponent",value.Serialize(false));
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Required, The child element that is a component of a System.
|
|
/// </summary>
|
|
[CimField(true, false)]
|
|
public override CimReference PartComponent
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("PartComponent")[0];
|
|
CimReference epr = new CimReference("PartComponent", XmlNamespace, innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("PartComponent",value.Serialize(false));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_SystemComponent 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_SystemComponent objects</returns>
|
|
public static new Collection<CIM_SystemComponent> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<CIM_SystemComponent> ret = CimBase.Enumerate<CIM_SystemComponent>(client, cimKeys);
|
|
return new Collection<CIM_SystemComponent>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_SystemComponent class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of CIM_SystemComponent objects</returns>
|
|
public static new Collection<CIM_SystemComponent> Enumerate(IWSManClient client)
|
|
{
|
|
List<CIM_SystemComponent> ret = CimBase.Enumerate<CIM_SystemComponent>(client);
|
|
return new Collection<CIM_SystemComponent>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of CIM_SystemComponent 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_SystemComponent>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the CIM_SystemComponent class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CIM_Component.CimKeys
|
|
{
|
|
/// <summary>
|
|
/// Required, The parent System in the Association.
|
|
/// </summary>
|
|
|
|
public virtual CimReference GroupComponent
|
|
{
|
|
get
|
|
{
|
|
string innerXML = GetKey("GroupComponent");
|
|
CimReference epr = new CimReference("GroupComponent", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_SystemComponent", innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("GroupComponent", value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Required, The child element that is a component of a System.
|
|
/// </summary>
|
|
|
|
public virtual CimReference PartComponent
|
|
{
|
|
get
|
|
{
|
|
string innerXML = GetKey("PartComponent");
|
|
CimReference epr = new CimReference("PartComponent", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_SystemComponent", innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("PartComponent", value);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|