//----------------------------------------------------------------------------
//
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
//
// File: CIM_ElementLocation.cs
//
// Contents: ElementLocation associates a ManagedElement with a location for positioning, inventory, maintenance and similar purposes. PhysicalElements can certainly have locations. They are explicitly defined in a subclass, PhysicalElement Location. However, other ManagedElements can also be associated with locations. For example, Organizations can be 'in' one or more locations, or Services can be restricted to a location.
// This file was automatically generated from CIM_ElementLocation.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
{
///
///ElementLocation associates a ManagedElement with a location for positioning, inventory, maintenance and similar purposes. PhysicalElements can certainly have locations. They are explicitly defined in a subclass, PhysicalElement Location. However, other ManagedElements can also be associated with locations. For example, Organizations can be 'in' one or more locations, or Services can be restricted to a location.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ElementLocation")]
[System.Xml.Serialization.XmlRootAttribute("CIM_ElementLocation", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ElementLocation", IsNullable=false)]
public class CIM_ElementLocation : CimBase
{
///
/// Default constructor.
///
public CIM_ElementLocation() :base()
{
}
///
/// Constructor that recieves an xml string for deserialization.
///
/// xml string to deserialize
public CIM_ElementLocation(string xml): base((IWSManClient)null)
{
this.Deserialize(xml);
}
///
/// Constructor which recieves a Ws-Management client object.
///
/// Ws-Management client
public CIM_ElementLocation(IWSManClient client): base(client)
{
}
///
/// Key, Required, The ManagedElement whose location is specified.
///
[CimField(true, false)]
public virtual CimReference Element
{
get
{
string innerXML = this.GetField("Element")[0];
CimReference epr = new CimReference("Element", XmlNamespace, innerXML);
return epr;
}
set
{
this.SetOrAddField("Element",value.Serialize(false));
}
}
///
/// Key, Required, The location of the element.
///
[CimField(true, false)]
public virtual CimReference PhysicalLocation
{
get
{
string innerXML = this.GetField("PhysicalLocation")[0];
CimReference epr = new CimReference("PhysicalLocation", XmlNamespace, innerXML);
return epr;
}
set
{
this.SetOrAddField("PhysicalLocation",value.Serialize(false));
}
}
///
/// Enumerate instances of CIM_ElementLocation class at an endpoint.
///
/// WS-Management client
/// Keys for selecting the instances
/// Collection of CIM_ElementLocation objects
public static Collection Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
{
List ret = CimBase.Enumerate(client, cimKeys);
return new Collection(ret);
}
///
/// Enumerate instances of CIM_ElementLocation class at an endpoint.
///
/// WS-Management client
/// Collection of CIM_ElementLocation objects
public static Collection Enumerate(IWSManClient client)
{
List ret = CimBase.Enumerate(client);
return new Collection(ret);
}
///
/// Delete the instance of CIM_ElementLocation 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_ElementLocation class.
///
public new class CimKeys : CimBase.CimKeys
{
///
/// Key, Required, The ManagedElement whose location is specified.
///
public virtual CimReference Element
{
get
{
string innerXML = GetKey("Element");
CimReference epr = new CimReference("Element", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ElementLocation", innerXML);
return epr;
}
set
{
SetOrAddKey("Element", value);
}
}
///
/// Key, Required, The location of the element.
///
public virtual CimReference PhysicalLocation
{
get
{
string innerXML = GetKey("PhysicalLocation");
CimReference epr = new CimReference("PhysicalLocation", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ElementLocation", innerXML);
return epr;
}
set
{
SetOrAddKey("PhysicalLocation", value);
}
}
}
}
}