//---------------------------------------------------------------------------- // // 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 { /// ///Capabilities and management of a Fan CoolingDevice. /// [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 { /// /// Default constructor. /// public CIM_Fan() :base() { } /// /// Constructor that recieves an xml string for deserialization. /// /// xml string to deserialize public CIM_Fan(string xml): base((IWSManClient)null) { this.Deserialize(xml); } /// /// Constructor which recieves a Ws-Management client object. /// /// Ws-Management client public CIM_Fan(IWSManClient client): base(client) { } /// /// Remove DesiredSpeed field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveDesiredSpeed() { RemoveField("DesiredSpeed"); } /// /// Is true if the field DesiredSpeed exists in the current object, /// otherwise is false. /// public virtual bool DesiredSpeedExist { get { return ContainsField("DesiredSpeed"); } } /// /// 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. /// [CimField(false, false)] public virtual ulong DesiredSpeed { get { return ulong.Parse(this["DesiredSpeed"][0], CultureInfo.InvariantCulture); } set { this.SetOrAddField("DesiredSpeed",value.ToString(CultureInfo.InvariantCulture)); } } /// /// Remove VariableSpeed field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveVariableSpeed() { RemoveField("VariableSpeed"); } /// /// Is true if the field VariableSpeed exists in the current object, /// otherwise is false. /// public virtual bool VariableSpeedExist { get { return ContainsField("VariableSpeed"); } } /// /// Optional, Indication of whether the fan supports variable speeds. /// [CimField(false, false)] public virtual bool VariableSpeed { get { return bool.Parse(this["VariableSpeed"][0]); } set { this.SetOrAddField("VariableSpeed",value.ToString().ToLower(CultureInfo.InvariantCulture)); } } /// ///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. /// [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) { } /// /// Optional, The desired speed for the fan. /// [CimField(false,false)] public virtual ulong DesiredSpeed { set { this.SetOrAddField("DesiredSpeed",value.ToString(CultureInfo.InvariantCulture)); } } } /// ///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. /// [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("") { } } /// ///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. /// /// Optional, IN -The desired speed for the fan. /// /// 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; } /// /// Enumerate instances of CIM_Fan class at an endpoint. /// /// WS-Management client /// Keys for selecting the instances /// Collection of CIM_Fan 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_Fan class at an endpoint. /// /// WS-Management client /// Collection of CIM_Fan objects public static new Collection Enumerate(IWSManClient client) { List ret = CimBase.Enumerate(client); return new Collection(ret); } /// /// Delete the instance of CIM_Fan 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_Fan class. /// public new class CimKeys : CIM_CoolingDevice.CimKeys { } } }