363 lines
16 KiB
C#
363 lines
16 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: CIM_PowerManagementCapabilities.cs
|
|
//
|
|
// Contents: A class derived from Capabilities that describes the power management aspects of an element (typically a system or device). The element's power management capabilities are decoupled from a PowerManagementService, since a single service could apply to multiple elements, each with specific capabilities.
|
|
// This file was automatically generated from CIM_PowerManagementCapabilities.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>
|
|
///A class derived from Capabilities that describes the power management aspects of an element (typically a system or device). The element's power management capabilities are decoupled from a PowerManagementService, since a single service could apply to multiple elements, each with specific capabilities.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementCapabilities")]
|
|
[System.Xml.Serialization.XmlRootAttribute("CIM_PowerManagementCapabilities", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementCapabilities", IsNullable=false)]
|
|
public class CIM_PowerManagementCapabilities : CIM_Capabilities
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public CIM_PowerManagementCapabilities() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public CIM_PowerManagementCapabilities(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_PowerManagementCapabilities(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Remove OtherPowerCapabilitiesDescriptions field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveOtherPowerCapabilitiesDescriptions()
|
|
{
|
|
RemoveField("OtherPowerCapabilitiesDescriptions");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field OtherPowerCapabilitiesDescriptions exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool OtherPowerCapabilitiesDescriptionsExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("OtherPowerCapabilitiesDescriptions");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, An array of strings describing an element's additional power management capabilities, used when the PowerCapabilities array includes the value 1, "Other".
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string[] OtherPowerCapabilitiesDescriptions
|
|
{
|
|
get
|
|
{
|
|
return CimTypesUtils.StringArrayToArray<string>(this["OtherPowerCapabilitiesDescriptions"]);
|
|
}
|
|
set
|
|
{
|
|
string[] arr = CimTypesUtils.ArrayToStringArray<string>(value);
|
|
this.SetOrAddField("OtherPowerCapabilitiesDescriptions", arr);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove OtherPowerChangeCapabilities field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveOtherPowerChangeCapabilities()
|
|
{
|
|
RemoveField("OtherPowerChangeCapabilities");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field OtherPowerChangeCapabilities exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool OtherPowerChangeCapabilitiesExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("OtherPowerChangeCapabilities");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, A string describing the additional power management capabilities of the element, used when the PowerChangeCapabilities is set to the value 1, "Other".
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string OtherPowerChangeCapabilities
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("OtherPowerChangeCapabilities")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("OtherPowerChangeCapabilities",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove PowerCapabilities field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemovePowerCapabilities()
|
|
{
|
|
RemoveField("PowerCapabilities");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field PowerCapabilities exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool PowerCapabilitiesExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("PowerCapabilities");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, An enumeration indicating the specific power-related capabilities of a managed element. Since this is an array, multiple values may be specified. The current values in the enumeration are:
|
|
/// 0 = Unknown
|
|
/// 1 = Other
|
|
/// 2 = Power Saving Modes Entered Automatically, describing that a managed element can change its power state based on usage or other criteria
|
|
/// 3 = Power State Settable, indicating that the SetPowerState method is supported
|
|
/// 4 = Power Cycling Supported, indicating that the SetPowerState method can be invoked with the PowerState input variable set to 'Power Cycle'
|
|
/// 5 = Timed Power On Supported, indicating that the SetPowerState method can be invoked with the PowerState input variable set to 'Power Cycle' and the Time parameter set to a specific date and time, or interval, for power-on.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ushort[] PowerCapabilities
|
|
{
|
|
get
|
|
{
|
|
return CimTypesUtils.StringArrayToArray<ushort>(this["PowerCapabilities"]);
|
|
}
|
|
set
|
|
{
|
|
string[] arr = CimTypesUtils.ArrayToStringArray<ushort>(value);
|
|
this.SetOrAddField("PowerCapabilities", arr);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove PowerChangeCapabilities field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemovePowerChangeCapabilities()
|
|
{
|
|
RemoveField("PowerChangeCapabilities");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field PowerChangeCapabilities exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool PowerChangeCapabilitiesExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("PowerChangeCapabilities");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, An enumeration indicating the specific power-related capabilities of a managed element. Since this is an array, multiple values may be specified. The current values in the enumeration are:
|
|
/// 0 = Unknown
|
|
/// 1 = Other
|
|
/// 2 = Power Saving Modes Entered Automatically, describing that a managed element can change its power state based on usage or other criteria
|
|
/// 3 = Power State Settable, indicating that the RequestPowerStateChange method is supported
|
|
/// 4 = Power Cycling Supported, indicating that the RequestPowerStateChange method can be invoked with the PowerState input variable set to 'Power Cycle (Off Soft)'
|
|
/// 5 = Timed Power On Supported, indicating that the RequestPowerStateChange method can be invoked with the PowerState input variable set to 'Power On' and the Time parameter set to a specific date and time, or interval, for power-on.8 = Graceful Shutdown Supported, indicating that the managed element can be sent a hardware signal requesting an orderly shutdown prior to the requested power state change.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ushort[] PowerChangeCapabilities
|
|
{
|
|
get
|
|
{
|
|
return CimTypesUtils.StringArrayToArray<ushort>(this["PowerChangeCapabilities"]);
|
|
}
|
|
set
|
|
{
|
|
string[] arr = CimTypesUtils.ArrayToStringArray<ushort>(value);
|
|
this.SetOrAddField("PowerChangeCapabilities", arr);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove PowerStatesSupported field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemovePowerStatesSupported()
|
|
{
|
|
RemoveField("PowerStatesSupported");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field PowerStatesSupported exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool PowerStatesSupportedExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("PowerStatesSupported");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, An enumeration that indicates the power states supported by a managed element. Because this is an array, multiple values can be specified. The current values in the enumeration are:
|
|
/// 2=On, corresponding to ACPI state G0 or S0 or D0.
|
|
/// 3=Sleep - Light, corresponding to ACPI state G1, S1/S2, or D1.
|
|
/// 4=Sleep - Deep, corresponding to ACPI state G1, S3, or D2.
|
|
/// 5=Power Cycle (Off - Soft), corresponding to ACPI state G2, S5, or D3, but where the managed element is set to return to power state "On" at a pre-determined time.
|
|
/// 6=Off - Hard, corresponding to ACPI state G3, S5, or D3.
|
|
/// 7=Hibernate (Off - Soft), corresponding to ACPI state S4, where the state of the managed element is preserved and will be recovered upon powering on.
|
|
/// 8=Off - Soft, corresponding to ACPI state G2, S5, or D3. 9= Power Cycle (Off-Hard), corresponds to the managed element reaching the ACPI state G3 followed by ACPI state S0.
|
|
/// 10=Master Bus Reset, corresponds to the system reaching ACPI state S5 followed by ACPI state S0. This is used to represent system master bus reset. 11=Diagnostic Interrupt (NMI), corresponding to the system reaching ACPI state S5 followed by ACPI state S0. This is used to represent system non-maskable interrupt. 12=Off - Soft Graceful, equivalent to Off Soft but preceded by a request to the managed element to perform an orderlyshutdown.
|
|
/// 13=Off - Hard Graceful, equivalent to Off Hard but preceded by a request to the managed element to perform an orderly shutdown.
|
|
/// 14=Master Bus Rest Graceful, equivalent to Master Bus Reset but preceded by a request to the managed element to perform an orderly shutdown.
|
|
/// 15=Power Cycle (Off - Soft Graceful), equivalent to Power Cycle (Off - Soft) but preceded by a request to the managed element to perform an orderly shutdown.
|
|
/// 16=Power Cycle (Off - Hard Graceful), equivalent to Power Cycle (Off - Hard) but preceded by a request to the managed element to perform an orderly shutdown.
|
|
/// ..=DMTF Reserved.
|
|
/// 0x7FFF..0xFFFF = Vendor Specific.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ushort[] PowerStatesSupported
|
|
{
|
|
get
|
|
{
|
|
return CimTypesUtils.StringArrayToArray<ushort>(this["PowerStatesSupported"]);
|
|
}
|
|
set
|
|
{
|
|
string[] arr = CimTypesUtils.ArrayToStringArray<ushort>(value);
|
|
this.SetOrAddField("PowerStatesSupported", arr);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove RequestedPowerStatesSupported field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveRequestedPowerStatesSupported()
|
|
{
|
|
RemoveField("RequestedPowerStatesSupported");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field RequestedPowerStatesSupported exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool RequestedPowerStatesSupportedExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("RequestedPowerStatesSupported");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, An enumeration that indicates the requested power states supported by the power management service. Because this is an array, multiple values can be specified. The current values in the enumeration are:
|
|
/// 2=On, corresponding to ACPI state G0 or S0 or D0.
|
|
/// 3=Sleep - Light, corresponding to ACPI state G1, S1/S2, or D1.
|
|
/// 4=Sleep - Deep, corresponding to ACPI state G1, S3, or D2.
|
|
/// 5=Power Cycle (Off - Soft), corresponding to ACPI state G2, S5, or D3, but where the managed element is set to return to power state "On" at a pre-determined time.
|
|
/// 6=Off - Hard, corresponding to ACPI state G3, S5, or D3.
|
|
/// 7=Hibernate (Off - Soft), corresponding to ACPI state S4, where the state of the managed element is preserved and will be recovered upon powering on.
|
|
/// 8=Off - Soft, corresponding to ACPI state G2, S5, or D3. 9= Power Cycle (Off-Hard), corresponds to the managed element reaching the ACPI state G3 followed by ACPI state S0.
|
|
/// 10=Master Bus Reset, corresponds to the system reaching ACPI state S5 followed by ACPI state S0. This is used to represent system master bus reset. 11=Diagnostic Interrupt (NMI), corresponding to the system reaching ACPI state S5 followed by ACPI state S0. This is used to represent system non-maskable interrupt. 12=Off - Soft Graceful, equivalent to Off Soft but preceded by a request to the managed element to perform an orderlyshutdown.
|
|
/// 13=Off - Hard Graceful, equivalent to Off Hard but preceded by a request to the managed element to perform an orderly shutdown.
|
|
/// 14=Master Bus Rest Graceful, equivalent to Master Bus Reset but preceded by a request to the managed element to perform an orderly shutdown.
|
|
/// 15=Power Cycle (Off - Soft Graceful), equivalent to Power Cycle (Off - Soft) but preceded by a request to the managed element to perform an orderly shutdown.
|
|
/// 16=Power Cycle (Off - Hard Graceful), equivalent to Power Cycle (Off - Hard) but preceded by a request to the managed element to perform an orderly shutdown.
|
|
/// 17=Diagnostic Interrupt (INIT), equivalent to Diagnostic Interrupt (NMI) but performed by an INIT switch instead because the NMI signal is masked.
|
|
/// ..=DMTF Reserved.
|
|
/// 0x7FFF..0xFFFF = Vendor Specific.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ushort[] RequestedPowerStatesSupported
|
|
{
|
|
get
|
|
{
|
|
return CimTypesUtils.StringArrayToArray<ushort>(this["RequestedPowerStatesSupported"]);
|
|
}
|
|
set
|
|
{
|
|
string[] arr = CimTypesUtils.ArrayToStringArray<ushort>(value);
|
|
this.SetOrAddField("RequestedPowerStatesSupported", arr);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_PowerManagementCapabilities 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_PowerManagementCapabilities objects</returns>
|
|
public static new Collection<CIM_PowerManagementCapabilities> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<CIM_PowerManagementCapabilities> ret = CimBase.Enumerate<CIM_PowerManagementCapabilities>(client, cimKeys);
|
|
return new Collection<CIM_PowerManagementCapabilities>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_PowerManagementCapabilities class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of CIM_PowerManagementCapabilities objects</returns>
|
|
public static new Collection<CIM_PowerManagementCapabilities> Enumerate(IWSManClient client)
|
|
{
|
|
List<CIM_PowerManagementCapabilities> ret = CimBase.Enumerate<CIM_PowerManagementCapabilities>(client);
|
|
return new Collection<CIM_PowerManagementCapabilities>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of CIM_PowerManagementCapabilities 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_PowerManagementCapabilities>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the CIM_PowerManagementCapabilities class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CIM_Capabilities.CimKeys
|
|
{
|
|
}
|
|
|
|
}
|
|
}
|
|
|