209 lines
6.2 KiB
C#
209 lines
6.2 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: AMT_StateTransitionCondition.cs
|
|
//
|
|
// Contents: Represents an application watchdog state transition that can trigger an action.
|
|
// This file was automatically generated from AMT_StateTransitionCondition.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>
|
|
///Represents an application watchdog state transition that can trigger an action.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_StateTransitionCondition")]
|
|
[System.Xml.Serialization.XmlRootAttribute("AMT_StateTransitionCondition", Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_StateTransitionCondition", IsNullable=false)]
|
|
public class AMT_StateTransitionCondition : CIM_PolicyCondition
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public AMT_StateTransitionCondition() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public AMT_StateTransitionCondition(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 AMT_StateTransitionCondition(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Remove NewState field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveNewState()
|
|
{
|
|
RemoveField("NewState");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field NewState exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool NewStateExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("NewState");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The state entered by the transition. 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.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ushort NewState
|
|
{
|
|
get
|
|
{
|
|
return ushort.Parse(this["NewState"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("NewState",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove OldState field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveOldState()
|
|
{
|
|
RemoveField("OldState");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field OldState exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool OldStateExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("OldState");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The state exited by the transition. 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.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ushort OldState
|
|
{
|
|
get
|
|
{
|
|
return ushort.Parse(this["OldState"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("OldState",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove StateSpace field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveStateSpace()
|
|
{
|
|
RemoveField("StateSpace");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field StateSpace exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool StateSpaceExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("StateSpace");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, A string that identifies the set of state values that can be assigned to OldState and NewState.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string StateSpace
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("StateSpace")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("StateSpace",value);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of AMT_StateTransitionCondition class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <param name="cimKeys">Keys for selecting the instances</param>
|
|
/// <returns>Collection of AMT_StateTransitionCondition objects</returns>
|
|
public static new Collection<AMT_StateTransitionCondition> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<AMT_StateTransitionCondition> ret = CimBase.Enumerate<AMT_StateTransitionCondition>(client, cimKeys);
|
|
return new Collection<AMT_StateTransitionCondition>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of AMT_StateTransitionCondition class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of AMT_StateTransitionCondition objects</returns>
|
|
public static new Collection<AMT_StateTransitionCondition> Enumerate(IWSManClient client)
|
|
{
|
|
List<AMT_StateTransitionCondition> ret = CimBase.Enumerate<AMT_StateTransitionCondition>(client);
|
|
return new Collection<AMT_StateTransitionCondition>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of AMT_StateTransitionCondition 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<AMT_StateTransitionCondition>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the AMT_StateTransitionCondition class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CIM_PolicyCondition.CimKeys
|
|
{
|
|
}
|
|
|
|
}
|
|
}
|
|
|