//----------------------------------------------------------------------------
//
// 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
{
///
///The Location class specifies the position and address of a PhysicalElement.
///
[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
{
///
/// Default constructor.
///
public CIM_Location() :base()
{
}
///
/// Constructor that recieves an xml string for deserialization.
///
/// xml string to deserialize
public CIM_Location(string xml): base((IWSManClient)null)
{
this.Deserialize(xml);
}
///
/// Constructor which recieves a Ws-Management client object.
///
/// Ws-Management client
public CIM_Location(IWSManClient client): base(client)
{
}
///
/// Remove Address field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveAddress()
{
RemoveField("Address");
}
///
/// Is true if the field Address exists in the current object,
/// otherwise is false.
///
public virtual bool AddressExist
{
get
{
return ContainsField("Address");
}
}
///
/// Optional, Address is a free-form string indicating a street, building, or other type of address for the location of the PhysicalElement.
///
[CimField(false, false)]
public virtual string Address
{
get
{
return this.GetField("Address")[0];
}
set
{
this.SetOrAddField("Address",value);
}
}
///
/// Key, Required, Name is a free-form string defining a label for the Location. It is a part of the key for the object.
///
[CimField(true, true)]
public virtual string Name
{
get
{
return this.GetField("Name")[0];
}
set
{
this.SetOrAddField("Name",value);
}
}
///
/// 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.
///
[CimField(true, true)]
public virtual string PhysicalPosition
{
get
{
return this.GetField("PhysicalPosition")[0];
}
set
{
this.SetOrAddField("PhysicalPosition",value);
}
}
///
/// Enumerate instances of CIM_Location class at an endpoint.
///
/// WS-Management client
/// Keys for selecting the instances
/// Collection of CIM_Location objects
public static new Collection Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
{
List ret = CimBase.Enumerate(client, cimKeys);
return new Collection(ret);
}
///
/// Enumerate instances of CIM_Location class at an endpoint.
///
/// WS-Management client
/// Collection of CIM_Location objects
public static new Collection Enumerate(IWSManClient client)
{
List ret = CimBase.Enumerate(client);
return new Collection(ret);
}
///
/// Delete the instance of CIM_Location if it is singular.
/// Note: This method will succeed only if a single instance of the class exists.
///
/// WS-Management client
public static new void Delete(IWSManClient client)
{
CimBase.Delete(client);
}
///
/// Represents the keys of the CIM_Location class.
///
public new class CimKeys : CIM_ManagedElement.CimKeys
{
///
/// Key, Required, Name is a free-form string defining a label for the Location. It is a part of the key for the object.
///
public virtual string Name
{
get
{
return GetKey("Name");
}
set
{
SetOrAddKey("Name", value);
}
}
///
/// 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.
///
public virtual string PhysicalPosition
{
get
{
return GetKey("PhysicalPosition");
}
set
{
SetOrAddKey("PhysicalPosition", value);
}
}
}
}
}