173 lines
5.7 KiB
C#
173 lines
5.7 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: CIM_InstalledSoftwareIdentity.cs
|
|
//
|
|
// Contents: The InstalledSoftwareIdentity association identifies the System on which a SoftwareIdentity is installed. This class is a corollary to InstalledSoftwareElement, but deals with the asset aspects of software (as indicated by SoftwareIdentity), versus the deployment aspects (as indicated by SoftwareElement).
|
|
// This file was automatically generated from CIM_InstalledSoftwareIdentity.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 InstalledSoftwareIdentity association identifies the System on which a SoftwareIdentity is installed. This class is a corollary to InstalledSoftwareElement, but deals with the asset aspects of software (as indicated by SoftwareIdentity), versus the deployment aspects (as indicated by SoftwareElement).
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_InstalledSoftwareIdentity")]
|
|
[System.Xml.Serialization.XmlRootAttribute("CIM_InstalledSoftwareIdentity", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_InstalledSoftwareIdentity", IsNullable=false)]
|
|
public class CIM_InstalledSoftwareIdentity : CimBase
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public CIM_InstalledSoftwareIdentity() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public CIM_InstalledSoftwareIdentity(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_InstalledSoftwareIdentity(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, The SoftwareIdentity that is installed.
|
|
/// </summary>
|
|
[CimField(true, false)]
|
|
public virtual CimReference InstalledSoftware
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("InstalledSoftware")[0];
|
|
CimReference epr = new CimReference("InstalledSoftware", XmlNamespace, innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("InstalledSoftware",value.Serialize(false));
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, The system on which the software is installed.
|
|
/// </summary>
|
|
[CimField(true, false)]
|
|
public virtual CimReference System
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("System")[0];
|
|
CimReference epr = new CimReference("System", XmlNamespace, innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("System",value.Serialize(false));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_InstalledSoftwareIdentity 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_InstalledSoftwareIdentity objects</returns>
|
|
public static Collection<CIM_InstalledSoftwareIdentity> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<CIM_InstalledSoftwareIdentity> ret = CimBase.Enumerate<CIM_InstalledSoftwareIdentity>(client, cimKeys);
|
|
return new Collection<CIM_InstalledSoftwareIdentity>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_InstalledSoftwareIdentity class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of CIM_InstalledSoftwareIdentity objects</returns>
|
|
public static Collection<CIM_InstalledSoftwareIdentity> Enumerate(IWSManClient client)
|
|
{
|
|
List<CIM_InstalledSoftwareIdentity> ret = CimBase.Enumerate<CIM_InstalledSoftwareIdentity>(client);
|
|
return new Collection<CIM_InstalledSoftwareIdentity>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of CIM_InstalledSoftwareIdentity 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 void Delete(IWSManClient client)
|
|
{
|
|
CimBase.Delete<CIM_InstalledSoftwareIdentity>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the CIM_InstalledSoftwareIdentity class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CimBase.CimKeys
|
|
{
|
|
/// <summary>
|
|
/// Key, Required, The SoftwareIdentity that is installed.
|
|
/// </summary>
|
|
|
|
public virtual CimReference InstalledSoftware
|
|
{
|
|
get
|
|
{
|
|
string innerXML = GetKey("InstalledSoftware");
|
|
CimReference epr = new CimReference("InstalledSoftware", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_InstalledSoftwareIdentity", innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("InstalledSoftware", value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Key, Required, The system on which the software is installed.
|
|
/// </summary>
|
|
|
|
public virtual CimReference System
|
|
{
|
|
get
|
|
{
|
|
string innerXML = GetKey("System");
|
|
CimReference epr = new CimReference("System", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_InstalledSoftwareIdentity", innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("System", value);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|