173 lines
5.5 KiB
C#
173 lines
5.5 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: CIM_OwningCollectionElement.cs
|
|
//
|
|
// Contents: OwningCollectionElement represents an association between a Collection and the ManagedElement responsible for the control or ownership of the Collection.
|
|
// This file was automatically generated from CIM_OwningCollectionElement.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>
|
|
///OwningCollectionElement represents an association between a Collection and the ManagedElement responsible for the control or ownership of the Collection.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_OwningCollectionElement")]
|
|
[System.Xml.Serialization.XmlRootAttribute("CIM_OwningCollectionElement", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_OwningCollectionElement", IsNullable=false)]
|
|
public class CIM_OwningCollectionElement : CimBase
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public CIM_OwningCollectionElement() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public CIM_OwningCollectionElement(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_OwningCollectionElement(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, The Collection owned or controlled by the ManagedElement.
|
|
/// </summary>
|
|
[CimField(true, false)]
|
|
public virtual CimReference OwnedElement
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("OwnedElement")[0];
|
|
CimReference epr = new CimReference("OwnedElement", XmlNamespace, innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("OwnedElement",value.Serialize(false));
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, The ManagedElement acting as the 'owner' or object that isresponsible for the control of the Collection.
|
|
/// </summary>
|
|
[CimField(true, false)]
|
|
public virtual CimReference OwningElement
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("OwningElement")[0];
|
|
CimReference epr = new CimReference("OwningElement", XmlNamespace, innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("OwningElement",value.Serialize(false));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_OwningCollectionElement 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_OwningCollectionElement objects</returns>
|
|
public static Collection<CIM_OwningCollectionElement> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<CIM_OwningCollectionElement> ret = CimBase.Enumerate<CIM_OwningCollectionElement>(client, cimKeys);
|
|
return new Collection<CIM_OwningCollectionElement>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_OwningCollectionElement class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of CIM_OwningCollectionElement objects</returns>
|
|
public static Collection<CIM_OwningCollectionElement> Enumerate(IWSManClient client)
|
|
{
|
|
List<CIM_OwningCollectionElement> ret = CimBase.Enumerate<CIM_OwningCollectionElement>(client);
|
|
return new Collection<CIM_OwningCollectionElement>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of CIM_OwningCollectionElement 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_OwningCollectionElement>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the CIM_OwningCollectionElement class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CimBase.CimKeys
|
|
{
|
|
/// <summary>
|
|
/// Key, Required, The Collection owned or controlled by the ManagedElement.
|
|
/// </summary>
|
|
|
|
public virtual CimReference OwnedElement
|
|
{
|
|
get
|
|
{
|
|
string innerXML = GetKey("OwnedElement");
|
|
CimReference epr = new CimReference("OwnedElement", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_OwningCollectionElement", innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("OwnedElement", value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Key, Required, The ManagedElement acting as the 'owner' or object that isresponsible for the control of the Collection.
|
|
/// </summary>
|
|
|
|
public virtual CimReference OwningElement
|
|
{
|
|
get
|
|
{
|
|
string innerXML = GetKey("OwningElement");
|
|
CimReference epr = new CimReference("OwningElement", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_OwningCollectionElement", innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("OwningElement", value);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|