201 lines
5.6 KiB
C#
201 lines
5.6 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: CIM_Location.cs
|
|
//
|
|
// Contents: The Location class specifies the position and address of a PhysicalElement.
|
|
// This file was automatically generated from CIM_Location.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 Location class specifies the position and address of a PhysicalElement.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Location")]
|
|
[System.Xml.Serialization.XmlRootAttribute("CIM_Location", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Location", IsNullable=false)]
|
|
public class CIM_Location : CIM_ManagedElement
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public CIM_Location() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public CIM_Location(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_Location(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Remove Address field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveAddress()
|
|
{
|
|
RemoveField("Address");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field Address exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool AddressExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("Address");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Address is a free-form string indicating a street, building, or other type of address for the location of the PhysicalElement.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string Address
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("Address")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Address",value);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, Name is a free-form string defining a label for the Location. It is a part of the key for the object.
|
|
/// </summary>
|
|
[CimField(true, true)]
|
|
public virtual string Name
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("Name")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Name",value);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, Position is a free-form string that indicates the placement of a PhysicalElement. It can specify slot information on a HostingBoard, mounting site in a Cabinet, or latitude and longitude information, for example, from a GPS. It is part of the key of the Location object.
|
|
/// </summary>
|
|
[CimField(true, true)]
|
|
public virtual string PhysicalPosition
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("PhysicalPosition")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("PhysicalPosition",value);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_Location 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_Location objects</returns>
|
|
public static new Collection<CIM_Location> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<CIM_Location> ret = CimBase.Enumerate<CIM_Location>(client, cimKeys);
|
|
return new Collection<CIM_Location>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_Location class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of CIM_Location objects</returns>
|
|
public static new Collection<CIM_Location> Enumerate(IWSManClient client)
|
|
{
|
|
List<CIM_Location> ret = CimBase.Enumerate<CIM_Location>(client);
|
|
return new Collection<CIM_Location>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of CIM_Location 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 new void Delete(IWSManClient client)
|
|
{
|
|
CimBase.Delete<CIM_Location>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the CIM_Location class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CIM_ManagedElement.CimKeys
|
|
{
|
|
/// <summary>
|
|
/// Key, Required, Name is a free-form string defining a label for the Location. It is a part of the key for the object.
|
|
/// </summary>
|
|
|
|
public virtual string Name
|
|
{
|
|
get
|
|
{
|
|
return GetKey("Name");
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("Name", value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Key, Required, Position is a free-form string that indicates the placement of a PhysicalElement. It can specify slot information on a HostingBoard, mounting site in a Cabinet, or latitude and longitude information, for example, from a GPS. It is part of the key of the Location object.
|
|
/// </summary>
|
|
|
|
public virtual string PhysicalPosition
|
|
{
|
|
get
|
|
{
|
|
return GetKey("PhysicalPosition");
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("PhysicalPosition", value);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|