225 lines
7.7 KiB
C#

//----------------------------------------------------------------------------
//
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
//
// File: CIM_Fan.cs
//
// Contents: Capabilities and management of a Fan CoolingDevice.
// This file was automatically generated from CIM_Fan.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>
///Capabilities and management of a Fan CoolingDevice.
/// </summary>
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Fan")]
[System.Xml.Serialization.XmlRootAttribute("CIM_Fan", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Fan", IsNullable=false)]
public class CIM_Fan : CIM_CoolingDevice
{
/// <summary>
/// Default constructor.
/// </summary>
public CIM_Fan() :base()
{
}
/// <summary>
/// Constructor that recieves an xml string for deserialization.
/// </summary>
/// <param name="xml">xml string to deserialize</param>
public CIM_Fan(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_Fan(IWSManClient client): base(client)
{
}
/// <summary>
/// Remove DesiredSpeed field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveDesiredSpeed()
{
RemoveField("DesiredSpeed");
}
/// <summary>
/// Is true if the field DesiredSpeed exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool DesiredSpeedExist
{
get
{
return ContainsField("DesiredSpeed");
}
}
/// <summary>
/// Optional, DesiredSpeed is the currently requested fan speed, defined in Revolutions per Minute, when a variable speed fan is supported (VariableSpeed boolean = TRUE). The current speed is determined via a sensor (CIM_Tachometer) that is associated with the Fan using the CIM_AssociatedSensor relationship.
/// </summary>
[CimField(false, false)]
public virtual ulong DesiredSpeed
{
get
{
return ulong.Parse(this["DesiredSpeed"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("DesiredSpeed",value.ToString(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Remove VariableSpeed field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveVariableSpeed()
{
RemoveField("VariableSpeed");
}
/// <summary>
/// Is true if the field VariableSpeed exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool VariableSpeedExist
{
get
{
return ContainsField("VariableSpeed");
}
}
/// <summary>
/// Optional, Indication of whether the fan supports variable speeds.
/// </summary>
[CimField(false, false)]
public virtual bool VariableSpeed
{
get
{
return bool.Parse(this["VariableSpeed"][0]);
}
set
{
this.SetOrAddField("VariableSpeed",value.ToString().ToLower(CultureInfo.InvariantCulture));
}
}
/// <summary>
///Requests that the Fan speed be set to the value specified in the method's input parameter. The return value should be 0 if the request was successfully executed, 1 if the request is not supported and some other value if an error occurred. In a subclass, the set of possible return codes could be specified, using a ValueMap qualifier on the method. The strings to which the ValueMap contents are 'translated' may also be specified in the subclass as a Values array qualifier.
/// </summary>
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Fan", IsNullable=false)]
private class SetSpeed_INPUT : CimParams
{
public SetSpeed_INPUT(string ns) : base(ns)
{
}
/// <summary>
/// Optional, The desired speed for the fan.
/// </summary>
[CimField(false,false)]
public virtual ulong DesiredSpeed
{
set
{
this.SetOrAddField("DesiredSpeed",value.ToString(CultureInfo.InvariantCulture));
}
}
}
/// <summary>
///Requests that the Fan speed be set to the value specified in the method's input parameter. The return value should be 0 if the request was successfully executed, 1 if the request is not supported and some other value if an error occurred. In a subclass, the set of possible return codes could be specified, using a ValueMap qualifier on the method. The strings to which the ValueMap contents are 'translated' may also be specified in the subclass as a Values array qualifier.
/// </summary>
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Fan", IsNullable=false)]
private class SetSpeed_OUTPUT : CimParams
{
public SetSpeed_OUTPUT() : base("")
{
}
}
/// <summary>
///Requests that the Fan speed be set to the value specified in the method's input parameter. The return value should be 0 if the request was successfully executed, 1 if the request is not supported and some other value if an error occurred. In a subclass, the set of possible return codes could be specified, using a ValueMap qualifier on the method. The strings to which the ValueMap contents are 'translated' may also be specified in the subclass as a Values array qualifier.
/// </summary>
/// <param name="inDesiredSpeed">Optional, IN -The desired speed for the fan.</param>
/// <returns>
/// </returns>
public virtual uint SetSpeed(ulong? inDesiredSpeed)
{
SetSpeed_INPUT input = new SetSpeed_INPUT(this.XmlNamespace);
if (inDesiredSpeed.HasValue)
input.DesiredSpeed=inDesiredSpeed.Value;
SetSpeed_OUTPUT output = new SetSpeed_OUTPUT();
uint returnValue = base.Invoke("SetSpeed",input,out output);
return returnValue;
}
/// <summary>
/// Enumerate instances of CIM_Fan 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_Fan objects</returns>
public static new Collection<CIM_Fan> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
{
List<CIM_Fan> ret = CimBase.Enumerate<CIM_Fan>(client, cimKeys);
return new Collection<CIM_Fan>(ret);
}
/// <summary>
/// Enumerate instances of CIM_Fan class at an endpoint.
/// </summary>
/// <param name="client">WS-Management client</param>
/// <returns>Collection of CIM_Fan objects</returns>
public static new Collection<CIM_Fan> Enumerate(IWSManClient client)
{
List<CIM_Fan> ret = CimBase.Enumerate<CIM_Fan>(client);
return new Collection<CIM_Fan>(ret);
}
/// <summary>
/// Delete the instance of CIM_Fan 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_Fan>(client);
}
/// <summary>
/// Represents the keys of the CIM_Fan class.
/// </summary>
public new class CimKeys : CIM_CoolingDevice.CimKeys
{
}
}
}