//----------------------------------------------------------------------------
//
// 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
{
///
///OwningCollectionElement represents an association between a Collection and the ManagedElement responsible for the control or ownership of the Collection.
///
[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
{
///
/// Default constructor.
///
public CIM_OwningCollectionElement() :base()
{
}
///
/// Constructor that recieves an xml string for deserialization.
///
/// xml string to deserialize
public CIM_OwningCollectionElement(string xml): base((IWSManClient)null)
{
this.Deserialize(xml);
}
///
/// Constructor which recieves a Ws-Management client object.
///
/// Ws-Management client
public CIM_OwningCollectionElement(IWSManClient client): base(client)
{
}
///
/// Key, Required, The Collection owned or controlled by the ManagedElement.
///
[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));
}
}
///
/// Key, Required, The ManagedElement acting as the 'owner' or object that isresponsible for the control of the Collection.
///
[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));
}
}
///
/// Enumerate instances of CIM_OwningCollectionElement class at an endpoint.
///
/// WS-Management client
/// Keys for selecting the instances
/// Collection of CIM_OwningCollectionElement objects
public static Collection Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
{
List ret = CimBase.Enumerate(client, cimKeys);
return new Collection(ret);
}
///
/// Enumerate instances of CIM_OwningCollectionElement class at an endpoint.
///
/// WS-Management client
/// Collection of CIM_OwningCollectionElement objects
public static Collection Enumerate(IWSManClient client)
{
List ret = CimBase.Enumerate(client);
return new Collection(ret);
}
///
/// Delete the instance of CIM_OwningCollectionElement if it is singular.
/// Note: This method will succeed only if a single instance of the class exists.
///
/// WS-Management client
public static void Delete(IWSManClient client)
{
CimBase.Delete(client);
}
///
/// Represents the keys of the CIM_OwningCollectionElement class.
///
public new class CimKeys : CimBase.CimKeys
{
///
/// Key, Required, The Collection owned or controlled by the ManagedElement.
///
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);
}
}
///
/// Key, Required, The ManagedElement acting as the 'owner' or object that isresponsible for the control of the Collection.
///
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);
}
}
}
}
}