173 lines
5.6 KiB
C#
173 lines
5.6 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// 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
|
|
{
|
|
/// <summary>
|
|
///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.
|
|
/// </summary>
|
|
[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
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public CIM_ElementLocation() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public CIM_ElementLocation(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_ElementLocation(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, The ManagedElement whose location is specified.
|
|
/// </summary>
|
|
[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));
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, The location of the element.
|
|
/// </summary>
|
|
[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));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_ElementLocation 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_ElementLocation objects</returns>
|
|
public static Collection<CIM_ElementLocation> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<CIM_ElementLocation> ret = CimBase.Enumerate<CIM_ElementLocation>(client, cimKeys);
|
|
return new Collection<CIM_ElementLocation>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_ElementLocation class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of CIM_ElementLocation objects</returns>
|
|
public static Collection<CIM_ElementLocation> Enumerate(IWSManClient client)
|
|
{
|
|
List<CIM_ElementLocation> ret = CimBase.Enumerate<CIM_ElementLocation>(client);
|
|
return new Collection<CIM_ElementLocation>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of CIM_ElementLocation 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_ElementLocation>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the CIM_ElementLocation class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CimBase.CimKeys
|
|
{
|
|
/// <summary>
|
|
/// Key, Required, The ManagedElement whose location is specified.
|
|
/// </summary>
|
|
|
|
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);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Key, Required, The location of the element.
|
|
/// </summary>
|
|
|
|
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);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|