353 lines
11 KiB
C#
353 lines
11 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: IPS_WatchDogAction.cs
|
|
//
|
|
// Contents: The IPS_WatchDogAction class configures the action of watch dog expiration.
|
|
// This file was automatically generated from IPS_WatchDogAction.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_WatchDogAction class configures the action of watch dog expiration.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_WatchDogAction")]
|
|
[System.Xml.Serialization.XmlRootAttribute("IPS_WatchDogAction", Namespace="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_WatchDogAction", IsNullable=false)]
|
|
public class IPS_WatchDogAction : CIM_ManagedElement
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public IPS_WatchDogAction() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public IPS_WatchDogAction(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_WatchDogAction(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Required, The action to invoke upon AP Watch dog expiration.'None' stands for no action. 'Reboot' stands for reset of the machine
|
|
/// </summary>
|
|
[CimField(false, true)]
|
|
public virtual uint AgentPresenceWatchDogExpirationAction
|
|
{
|
|
get
|
|
{
|
|
return uint.Parse(this["AgentPresenceWatchDogExpirationAction"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("AgentPresenceWatchDogExpirationAction",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Required, The action to invoke upon OS Watch dog expiration.'None' stands for no action. 'Reboot' stands for reset of the machine
|
|
/// </summary>
|
|
[CimField(false, true)]
|
|
public virtual uint HeciWatchDogExpirationAction
|
|
{
|
|
get
|
|
{
|
|
return uint.Parse(this["HeciWatchDogExpirationAction"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("HeciWatchDogExpirationAction",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required,
|
|
/// </summary>
|
|
[CimField(true, true)]
|
|
public override string InstanceID
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("InstanceID")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("InstanceID",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove ReArmReset field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveReArmReset()
|
|
{
|
|
RemoveField("ReArmReset");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field ReArmReset exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool ReArmResetExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("ReArmReset");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Allows the manageability to perform reset again
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual bool ReArmReset
|
|
{
|
|
get
|
|
{
|
|
return bool.Parse(this["ReArmReset"][0]);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("ReArmReset",value.ToString().ToLower(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove Timeout field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveTimeout()
|
|
{
|
|
RemoveField("Timeout");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field Timeout exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool TimeoutExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("Timeout");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, How long to wait (in seconds) before applying HeciWatchDogExpirationAction or AgentPresenceWatchDogExpirationAction
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual uint Timeout
|
|
{
|
|
get
|
|
{
|
|
return uint.Parse(this["Timeout"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Timeout",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
///Apply AgentPresenceWatchDogExpirationAction on instance of AMT_AgentPresenceWatchdog.Creates association of CIM_ElementSettingData between IPS_WatchDogAction and the specified instance.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_WatchDogAction", IsNullable=false)]
|
|
private class ApplyActionOnWatchDog_INPUT : CimParams
|
|
{
|
|
public ApplyActionOnWatchDog_INPUT(string ns) : base(ns)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Required, The instance of the AMT_AgentPresenceWatchdog to apply action on.
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual CimReference AgentPresenceWatchDog
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("AgentPresenceWatchDog",value.Serialize(false));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Required, Determine if action should be applied or not on AMT_AgentPresenceWatchdog instance
|
|
/// </summary>
|
|
[CimField(false,true)]
|
|
public virtual bool ActionEnable
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("ActionEnable",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///Apply AgentPresenceWatchDogExpirationAction on instance of AMT_AgentPresenceWatchdog.Creates association of CIM_ElementSettingData between IPS_WatchDogAction and the specified instance.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_WatchDogAction", IsNullable=false)]
|
|
private class ApplyActionOnWatchDog_OUTPUT : CimParams
|
|
{
|
|
public ApplyActionOnWatchDog_OUTPUT() : base("")
|
|
{
|
|
}
|
|
|
|
}
|
|
/// <summary>
|
|
///Apply AgentPresenceWatchDogExpirationAction on instance of AMT_AgentPresenceWatchdog.Creates association of CIM_ElementSettingData between IPS_WatchDogAction and the specified instance.
|
|
/// </summary>
|
|
/// <param name="inAgentPresenceWatchDog">Required, IN -The instance of the AMT_AgentPresenceWatchdog to apply action on.</param>
|
|
/// <param name="inActionEnable">Required, IN -Determine if action should be applied or not on AMT_AgentPresenceWatchdog instance</param>
|
|
/// <returns>
|
|
/// Legal values:
|
|
/// Completed with No Error : 0
|
|
/// Not Supported : 1
|
|
/// Failed : 2
|
|
/// Method Reserved : ..
|
|
/// </returns>
|
|
public virtual uint ApplyActionOnWatchDog(CimReference inAgentPresenceWatchDog,bool? inActionEnable)
|
|
{
|
|
ApplyActionOnWatchDog_INPUT input = new ApplyActionOnWatchDog_INPUT(this.XmlNamespace);
|
|
if (inAgentPresenceWatchDog != null)
|
|
input.AgentPresenceWatchDog=inAgentPresenceWatchDog;
|
|
if (inActionEnable.HasValue)
|
|
input.ActionEnable=inActionEnable.Value;
|
|
ApplyActionOnWatchDog_OUTPUT output = new ApplyActionOnWatchDog_OUTPUT();
|
|
uint returnValue = base.Invoke("ApplyActionOnWatchDog",input,out output);
|
|
return returnValue;
|
|
}
|
|
/// <summary>
|
|
///Cancel Reboot operation following WD expiration.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_WatchDogAction", IsNullable=false)]
|
|
private class CancelRebootAction_INPUT : CimParams
|
|
{
|
|
public CancelRebootAction_INPUT(string ns) : base(ns)
|
|
{
|
|
}
|
|
|
|
}
|
|
/// <summary>
|
|
///Cancel Reboot operation following WD expiration.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_WatchDogAction", IsNullable=false)]
|
|
private class CancelRebootAction_OUTPUT : CimParams
|
|
{
|
|
public CancelRebootAction_OUTPUT() : base("")
|
|
{
|
|
}
|
|
|
|
}
|
|
/// <summary>
|
|
///Cancel Reboot operation following WD expiration.
|
|
/// </summary>
|
|
/// <returns>
|
|
/// Legal values:
|
|
/// Completed with No Error : 0
|
|
/// Not Supported : 1
|
|
/// Failed : 2
|
|
/// Method Reserved : ..
|
|
/// </returns>
|
|
public virtual uint CancelRebootAction()
|
|
{
|
|
CancelRebootAction_INPUT input = new CancelRebootAction_INPUT(this.XmlNamespace);
|
|
CancelRebootAction_OUTPUT output = new CancelRebootAction_OUTPUT();
|
|
uint returnValue = base.Invoke("CancelRebootAction",input,out output);
|
|
return returnValue;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of IPS_WatchDogAction 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_WatchDogAction objects</returns>
|
|
public static new Collection<IPS_WatchDogAction> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<IPS_WatchDogAction> ret = CimBase.Enumerate<IPS_WatchDogAction>(client, cimKeys);
|
|
return new Collection<IPS_WatchDogAction>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of IPS_WatchDogAction class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of IPS_WatchDogAction objects</returns>
|
|
public static new Collection<IPS_WatchDogAction> Enumerate(IWSManClient client)
|
|
{
|
|
List<IPS_WatchDogAction> ret = CimBase.Enumerate<IPS_WatchDogAction>(client);
|
|
return new Collection<IPS_WatchDogAction>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of IPS_WatchDogAction 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_WatchDogAction>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the IPS_WatchDogAction 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);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|