203 lines
5.7 KiB
C#
203 lines
5.7 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: IPS_HostBootReason.cs
|
|
//
|
|
// Contents: The IPS_HostBootReason class returns the details of the last host boot.
|
|
// This file was automatically generated from IPS_HostBootReason.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 IPS_HostBootReason class returns the details of the last host boot.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_HostBootReason")]
|
|
[System.Xml.Serialization.XmlRootAttribute("IPS_HostBootReason", Namespace="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_HostBootReason", IsNullable=false)]
|
|
public class IPS_HostBootReason : CIM_ManagedElement
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public IPS_HostBootReason() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public IPS_HostBootReason(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 IPS_HostBootReason(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required,
|
|
/// </summary>
|
|
[CimField(true, true)]
|
|
public override string InstanceID
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("InstanceID")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("InstanceID",value);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Required, The host S-state prior to the last boot.
|
|
/// </summary>
|
|
[CimField(false, true)]
|
|
public virtual uint PreviousSxState
|
|
{
|
|
get
|
|
{
|
|
return uint.Parse(this["PreviousSxState"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("PreviousSxState",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Required, The reason for the last host boot.'Other' stands for a boot that did not originate in AMT, e.g. OS-initiated reset.'Remote Control' stands for a boot that originated in AMT remote control operation.'Alarm' stands for a boot that originated in an Alarm Clock operation.
|
|
/// </summary>
|
|
[CimField(false, true)]
|
|
public virtual uint Reason
|
|
{
|
|
get
|
|
{
|
|
return uint.Parse(this["Reason"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Reason",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove ReasonDetails field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveReasonDetails()
|
|
{
|
|
RemoveField("ReasonDetails");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field ReasonDetails exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool ReasonDetailsExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("ReasonDetails");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Details of the last host boot reason.If reason is 'Remote Control', this field will contain a string representing the remote control operation performed ("Reset", "Power Up" or "Power Cycle"). If reason is 'Alarm', this field will contain the ElementName of the IPS_AlarmClockOccurence instance that invoked the alarm.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string ReasonDetails
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("ReasonDetails")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("ReasonDetails",value);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of IPS_HostBootReason class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <param name="cimKeys">Keys for selecting the instances</param>
|
|
/// <returns>Collection of IPS_HostBootReason objects</returns>
|
|
public static new Collection<IPS_HostBootReason> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<IPS_HostBootReason> ret = CimBase.Enumerate<IPS_HostBootReason>(client, cimKeys);
|
|
return new Collection<IPS_HostBootReason>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of IPS_HostBootReason class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of IPS_HostBootReason objects</returns>
|
|
public static new Collection<IPS_HostBootReason> Enumerate(IWSManClient client)
|
|
{
|
|
List<IPS_HostBootReason> ret = CimBase.Enumerate<IPS_HostBootReason>(client);
|
|
return new Collection<IPS_HostBootReason>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of IPS_HostBootReason 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<IPS_HostBootReason>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the IPS_HostBootReason class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CIM_ManagedElement.CimKeys
|
|
{
|
|
/// <summary>
|
|
/// Key, Required,
|
|
/// </summary>
|
|
|
|
public virtual string InstanceID
|
|
{
|
|
get
|
|
{
|
|
return GetKey("InstanceID");
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("InstanceID", value);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|