//----------------------------------------------------------------------------
//
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
//
// File: AMT_AgentPresenceWatchdog.cs
//
// Contents: Represents the monitoring state associated with a single agent.
// This file was automatically generated from AMT_AgentPresenceWatchdog.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
{
///
///Represents the monitoring state associated with a single agent.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AgentPresenceWatchdog")]
[System.Xml.Serialization.XmlRootAttribute("AMT_AgentPresenceWatchdog", Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AgentPresenceWatchdog", IsNullable=false)]
public class AMT_AgentPresenceWatchdog : CIM_Watchdog
{
///
/// Default constructor.
///
public AMT_AgentPresenceWatchdog() :base()
{
}
///
/// Constructor that recieves an xml string for deserialization.
///
/// xml string to deserialize
public AMT_AgentPresenceWatchdog(string xml): base((IWSManClient)null)
{
this.Deserialize(xml);
}
///
/// Constructor which recieves a Ws-Management client object.
///
/// Ws-Management client
public AMT_AgentPresenceWatchdog(IWSManClient client): base(client)
{
}
///
/// Remove CurrentState field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveCurrentState()
{
RemoveField("CurrentState");
}
///
/// Is true if the field CurrentState exists in the current object,
/// otherwise is false.
///
public virtual bool CurrentStateExist
{
get
{
return ContainsField("CurrentState");
}
}
///
/// Optional, Describes the current state of the monitored application. The possible states are: 1 - NotStarted, 2 - Stopped, 4 - Running, 8 - Expired, 16 - Suspended.
///
[CimField(false, false)]
public virtual ushort CurrentState
{
get
{
return ushort.Parse(this["CurrentState"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("CurrentState",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Key, Required, A GUID which is the AgentID for the monitored application encoded as Base64.
///
[CimField(true, true)]
public override string DeviceID
{
get
{
return this.GetField("DeviceID")[0];
}
set
{
this.SetOrAddField("DeviceID",value);
}
}
///
/// Remove MonitoredEntityDescription field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public override void RemoveMonitoredEntityDescription()
{
RemoveField("MonitoredEntityDescription");
}
///
/// Is true if the field MonitoredEntityDescription exists in the current object,
/// otherwise is false.
///
public override bool MonitoredEntityDescriptionExist
{
get
{
return ContainsField("MonitoredEntityDescription");
}
}
///
/// Optional, Description of the application monitored by this watchdog instance.
///
[CimField(false, false)]
public override string MonitoredEntityDescription
{
get
{
return this.GetField("MonitoredEntityDescription")[0];
}
set
{
this.SetOrAddField("MonitoredEntityDescription",value);
}
}
///
/// Required, A seconds timer value which specifies the maximum time allowed for an application to start up and start sending application heartbeat calls (i.e., the time after system restart or after adding a new agent watchdog).
///
[CimField(false, true)]
public virtual ushort StartupInterval
{
get
{
return ushort.Parse(this["StartupInterval"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("StartupInterval",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Required, The timeout interval used by the watchdog.
///
[CimField(false, true)]
public override uint TimeoutInterval
{
get
{
return uint.Parse(this["TimeoutInterval"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("TimeoutInterval",value.ToString(CultureInfo.InvariantCulture));
}
}
///
///This method is issued by applications that wish to start reporting their running state.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AgentPresenceWatchdog", IsNullable=false)]
private class RegisterAgent_INPUT : CimParams
{
public RegisterAgent_INPUT(string ns) : base(ns)
{
}
}
///
///This method is issued by applications that wish to start reporting their running state.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AgentPresenceWatchdog", IsNullable=false)]
private class RegisterAgent_OUTPUT : CimParams
{
public RegisterAgent_OUTPUT() : base("")
{
}
///
/// Optional, A random sequence number returned by the Intel(R) AMT device. This number should be incremented by one in subsequent calls (when provided). After the counter reaches its highest possible value, it is rolled to zero. The sequence number is used to enforce detection of crashed applications which may have lost their handles. The sequence number is not intended to provide any form of security for this flow.
///
[CimField(false,false)]
public virtual uint SessionSequenceNumber
{
get
{
return uint.Parse(this["SessionSequenceNumber"][0], CultureInfo.InvariantCulture);
}
}
///
/// Optional, A seconds timer value which specifies the maximum time allowed between application heartbeat calls.
///
[CimField(false,false)]
public virtual ushort TimeoutInterval
{
get
{
return ushort.Parse(this["TimeoutInterval"][0], CultureInfo.InvariantCulture);
}
}
}
///
///This method is issued by applications that wish to start reporting their running state.
///
/// OUT - A random sequence number returned by the Intel(R) AMT device. This number should be incremented by one in subsequent calls (when provided). After the counter reaches its highest possible value, it is rolled to zero. The sequence number is used to enforce detection of crashed applications which may have lost their handles. The sequence number is not intended to provide any form of security for this flow.
/// OUT - A seconds timer value which specifies the maximum time allowed between application heartbeat calls.
///
/// Legal values:
/// PT_STATUS_SUCCESS : 0
/// PT_STATUS_INTERNAL_ERROR : 1
///
public virtual uint RegisterAgent(out uint outSessionSequenceNumber,out ushort outTimeoutInterval)
{
RegisterAgent_INPUT input = new RegisterAgent_INPUT(this.XmlNamespace);
RegisterAgent_OUTPUT output = new RegisterAgent_OUTPUT();
uint returnValue = base.Invoke("RegisterAgent",input,out output);
outSessionSequenceNumber=0;
outTimeoutInterval=0;
if (returnValue == 0)
{
if (output.ContainsField("SessionSequenceNumber"))
outSessionSequenceNumber = output.SessionSequenceNumber;
if (output.ContainsField("TimeoutInterval"))
outTimeoutInterval = output.TimeoutInterval;
}
return returnValue;
}
///
///This method is issued periodically by applications to report their running state.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AgentPresenceWatchdog", IsNullable=false)]
private class AssertPresence_INPUT : CimParams
{
public AssertPresence_INPUT(string ns) : base(ns)
{
}
///
/// Required, A random sequence number returned by the Intel(R) AMT device when the agent last called RegisterAgent. This number should be incremented by one.
///
[CimField(false,true)]
public virtual uint SequenceNumber
{
set
{
this.SetOrAddField("SequenceNumber",value.ToString(CultureInfo.InvariantCulture));
}
}
}
///
///This method is issued periodically by applications to report their running state.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AgentPresenceWatchdog", IsNullable=false)]
private class AssertPresence_OUTPUT : CimParams
{
public AssertPresence_OUTPUT() : base("")
{
}
}
///
///This method is issued periodically by applications to report their running state.
///
/// Required, IN -A random sequence number returned by the Intel(R) AMT device when the agent last called RegisterAgent. This number should be incremented by one.
///
/// Legal values:
/// PT_STATUS_SUCCESS : 0
/// PT_STATUS_INTERNAL_ERROR : 1
/// PT_STATUS_INVALID_PARAMETER : 36
///
public virtual uint AssertPresence(uint? inSequenceNumber)
{
AssertPresence_INPUT input = new AssertPresence_INPUT(this.XmlNamespace);
if (inSequenceNumber.HasValue)
input.SequenceNumber=inSequenceNumber.Value;
AssertPresence_OUTPUT output = new AssertPresence_OUTPUT();
uint returnValue = base.Invoke("AssertPresence",input,out output);
return returnValue;
}
///
///This method is issued by applications to report their termination state.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AgentPresenceWatchdog", IsNullable=false)]
private class AssertShutdown_INPUT : CimParams
{
public AssertShutdown_INPUT(string ns) : base(ns)
{
}
///
/// Required, A random sequence number returned by the Intel(R) AMT device on the former RegisterAgent call. If a call is made with a bad sequence number, it will be ignored so that an invalid agent trying to 'scan' for the current sequence number receives a minimum amount of information. After this call succeeds (in such a way that the command is not ignored), the SequenceNumber is no longer valid and subsequent calls cannot be issued until re-registering. This number should be incremented by one.
///
[CimField(false,true)]
public virtual uint SequenceNumber
{
set
{
this.SetOrAddField("SequenceNumber",value.ToString(CultureInfo.InvariantCulture));
}
}
}
///
///This method is issued by applications to report their termination state.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AgentPresenceWatchdog", IsNullable=false)]
private class AssertShutdown_OUTPUT : CimParams
{
public AssertShutdown_OUTPUT() : base("")
{
}
}
///
///This method is issued by applications to report their termination state.
///
/// Required, IN -A random sequence number returned by the Intel(R) AMT device on the former RegisterAgent call. If a call is made with a bad sequence number, it will be ignored so that an invalid agent trying to 'scan' for the current sequence number receives a minimum amount of information. After this call succeeds (in such a way that the command is not ignored), the SequenceNumber is no longer valid and subsequent calls cannot be issued until re-registering. This number should be incremented by one.
///
/// Legal values:
/// PT_STATUS_SUCCESS : 0
/// PT_STATUS_INTERNAL_ERROR : 1
/// PT_STATUS_INVALID_PARAMETER : 36
///
public virtual uint AssertShutdown(uint? inSequenceNumber)
{
AssertShutdown_INPUT input = new AssertShutdown_INPUT(this.XmlNamespace);
if (inSequenceNumber.HasValue)
input.SequenceNumber=inSequenceNumber.Value;
AssertShutdown_OUTPUT output = new AssertShutdown_OUTPUT();
uint returnValue = base.Invoke("AssertShutdown",input,out output);
return returnValue;
}
///
///This method adds an action to the application watchdog.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AgentPresenceWatchdog", IsNullable=false)]
private class AddAction_INPUT : CimParams
{
public AddAction_INPUT(string ns) : base(ns)
{
}
///
/// Required, The last state of the application watchdog. This state may be set to a value containing a logical OR of watchdog states. The possible states are: 1 - NotStarted, 2 - Stopped, 4 - Running, 8 - Expired, 16 - Suspended.
///
[CimField(false,true)]
public virtual ushort OldState
{
set
{
this.SetOrAddField("OldState",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Required, The current state of the application watchdog. This state may be set to a value containing a logical OR of watchdog states. The possible states are: 1 - NotStarted, 2 - Stopped, 4 - Running, 8 - Expired, 16 - Suspended.
///
[CimField(false,true)]
public virtual ushort NewState
{
set
{
this.SetOrAddField("NewState",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Required, Specifies whether an Event should be created in the Event Manager when the application watchdog transitions from OldState to NewState.
///
[CimField(false,true)]
public virtual bool EventOnTransition
{
set
{
this.SetOrAddField("EventOnTransition",value.ToString().ToLower(CultureInfo.InvariantCulture));
}
}
///
/// Optional, A System Defense Action which may be applied, when the application watchdog transitions from OldState to NewState. If the caller did not create any policy through AMT_AgentPresenceInterfacePolicy (or ConsoleWatchdogSetCbPolicy() PTNI operation), no policy will be activated, however if the caller created an AMT_AgentPresenceInterfacePolicy to specify a policy at later time, the policy may be activated immediatly according to the logical state which is currently maintained by the Agent Presence feature. This action is optional.
///
[CimField(false,false)]
public virtual ushort ActionSd
{
set
{
this.SetOrAddField("ActionSd",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Optional, When this field is TRUE it enables two actions: 1. Information about this agent is included in an Intel(R) AMT EAC posture. This happens if at least one transition is defined as TRUE for this agent. Posture information includes current state and state counters showing how many times each state was entered. 2. When this specific state transition occurs, an avent is generated to indicate that Intel(R) AMT posture has changed.
///
[CimField(false,false)]
public virtual bool ActionEac
{
set
{
this.SetOrAddField("ActionEac",value.ToString().ToLower(CultureInfo.InvariantCulture));
}
}
}
///
///This method adds an action to the application watchdog.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AgentPresenceWatchdog", IsNullable=false)]
private class AddAction_OUTPUT : CimParams
{
public AddAction_OUTPUT() : base("")
{
}
}
///
///This method adds an action to the application watchdog.
///
/// Required, IN -The last state of the application watchdog. This state may be set to a value containing a logical OR of watchdog states. The possible states are: 1 - NotStarted, 2 - Stopped, 4 - Running, 8 - Expired, 16 - Suspended.
/// Required, IN -The current state of the application watchdog. This state may be set to a value containing a logical OR of watchdog states. The possible states are: 1 - NotStarted, 2 - Stopped, 4 - Running, 8 - Expired, 16 - Suspended.
/// Required, IN -Specifies whether an Event should be created in the Event Manager when the application watchdog transitions from OldState to NewState.
/// Optional, IN -A System Defense Action which may be applied, when the application watchdog transitions from OldState to NewState. If the caller did not create any policy through AMT_AgentPresenceInterfacePolicy (or ConsoleWatchdogSetCbPolicy() PTNI operation), no policy will be activated, however if the caller created an AMT_AgentPresenceInterfacePolicy to specify a policy at later time, the policy may be activated immediatly according to the logical state which is currently maintained by the Agent Presence feature. This action is optional.
/// Optional, IN -When this field is TRUE it enables two actions: 1. Information about this agent is included in an Intel(R) AMT EAC posture. This happens if at least one transition is defined as TRUE for this agent. Posture information includes current state and state counters showing how many times each state was entered. 2. When this specific state transition occurs, an avent is generated to indicate that Intel(R) AMT posture has changed.
///
/// Legal values:
/// PT_STATUS_SUCCESS : 0
/// PT_STATUS_INTERNAL_ERROR : 1
/// PT_STATUS_MAX_LIMIT_REACHED : 23
/// PT_STATUS_INVALID_PARAMETER : 36
/// PT_STATUS_FLASH_WRITE_LIMIT_EXCEEDED : 38
/// PT_STATUS_AUDIT_FAIL : 2075
///
public virtual uint AddAction(ushort? inOldState,ushort? inNewState,bool? inEventOnTransition,ushort? inActionSd,bool? inActionEac)
{
AddAction_INPUT input = new AddAction_INPUT(this.XmlNamespace);
if (inOldState.HasValue)
input.OldState=inOldState.Value;
if (inNewState.HasValue)
input.NewState=inNewState.Value;
if (inEventOnTransition.HasValue)
input.EventOnTransition=inEventOnTransition.Value;
if (inActionSd.HasValue)
input.ActionSd=inActionSd.Value;
if (inActionEac.HasValue)
input.ActionEac=inActionEac.Value;
AddAction_OUTPUT output = new AddAction_OUTPUT();
uint returnValue = base.Invoke("AddAction",input,out output);
return returnValue;
}
///
///This method removes all actions associated with the watchdog.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AgentPresenceWatchdog", IsNullable=false)]
private class DeleteAllActions_INPUT : CimParams
{
public DeleteAllActions_INPUT(string ns) : base(ns)
{
}
}
///
///This method removes all actions associated with the watchdog.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AgentPresenceWatchdog", IsNullable=false)]
private class DeleteAllActions_OUTPUT : CimParams
{
public DeleteAllActions_OUTPUT() : base("")
{
}
}
///
///This method removes all actions associated with the watchdog.
///
///
/// Legal values:
/// PT_STATUS_SUCCESS : 0
/// PT_STATUS_INTERNAL_ERROR : 1
/// PT_STATUS_AUDIT_FAIL : 2075
///
public virtual uint DeleteAllActions()
{
DeleteAllActions_INPUT input = new DeleteAllActions_INPUT(this.XmlNamespace);
DeleteAllActions_OUTPUT output = new DeleteAllActions_OUTPUT();
uint returnValue = base.Invoke("DeleteAllActions",input,out output);
return returnValue;
}
///
/// Enumerate instances of AMT_AgentPresenceWatchdog class at an endpoint.
///
/// WS-Management client
/// Keys for selecting the instances
/// Collection of AMT_AgentPresenceWatchdog objects
public static new Collection Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
{
List ret = CimBase.Enumerate(client, cimKeys);
return new Collection(ret);
}
///
/// Enumerate instances of AMT_AgentPresenceWatchdog class at an endpoint.
///
/// WS-Management client
/// Collection of AMT_AgentPresenceWatchdog objects
public static new Collection Enumerate(IWSManClient client)
{
List ret = CimBase.Enumerate(client);
return new Collection(ret);
}
///
/// Delete the instance of AMT_AgentPresenceWatchdog 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 AMT_AgentPresenceWatchdog class.
///
public new class CimKeys : CIM_Watchdog.CimKeys
{
///
/// Key, Required, A GUID which is the AgentID for the monitored application encoded as Base64.
///
public virtual string DeviceID
{
get
{
return GetKey("DeviceID");
}
set
{
SetOrAddKey("DeviceID", value);
}
}
}
}
}