//----------------------------------------------------------------------------
//
// 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
{
///
///Represents an application watchdog state transition that can trigger an action.
///
[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
{
///
/// Default constructor.
///
public AMT_StateTransitionCondition() :base()
{
}
///
/// Constructor that recieves an xml string for deserialization.
///
/// xml string to deserialize
public AMT_StateTransitionCondition(string xml): base((IWSManClient)null)
{
this.Deserialize(xml);
}
///
/// Constructor which recieves a Ws-Management client object.
///
/// Ws-Management client
public AMT_StateTransitionCondition(IWSManClient client): base(client)
{
}
///
/// Remove NewState field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveNewState()
{
RemoveField("NewState");
}
///
/// Is true if the field NewState exists in the current object,
/// otherwise is false.
///
public virtual bool NewStateExist
{
get
{
return ContainsField("NewState");
}
}
///
/// 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.
///
[CimField(false, false)]
public virtual ushort NewState
{
get
{
return ushort.Parse(this["NewState"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("NewState",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Remove OldState field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveOldState()
{
RemoveField("OldState");
}
///
/// Is true if the field OldState exists in the current object,
/// otherwise is false.
///
public virtual bool OldStateExist
{
get
{
return ContainsField("OldState");
}
}
///
/// 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.
///
[CimField(false, false)]
public virtual ushort OldState
{
get
{
return ushort.Parse(this["OldState"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("OldState",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Remove StateSpace field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveStateSpace()
{
RemoveField("StateSpace");
}
///
/// Is true if the field StateSpace exists in the current object,
/// otherwise is false.
///
public virtual bool StateSpaceExist
{
get
{
return ContainsField("StateSpace");
}
}
///
/// Optional, A string that identifies the set of state values that can be assigned to OldState and NewState.
///
[CimField(false, false)]
public virtual string StateSpace
{
get
{
return this.GetField("StateSpace")[0];
}
set
{
this.SetOrAddField("StateSpace",value);
}
}
///
/// Enumerate instances of AMT_StateTransitionCondition class at an endpoint.
///
/// WS-Management client
/// Keys for selecting the instances
/// Collection of AMT_StateTransitionCondition 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_StateTransitionCondition class at an endpoint.
///
/// WS-Management client
/// Collection of AMT_StateTransitionCondition objects
public static new Collection Enumerate(IWSManClient client)
{
List ret = CimBase.Enumerate(client);
return new Collection(ret);
}
///
/// Delete the instance of AMT_StateTransitionCondition 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_StateTransitionCondition class.
///
public new class CimKeys : CIM_PolicyCondition.CimKeys
{
}
}
}