341 lines
12 KiB
C#
341 lines
12 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: CIM_PolicyAction.cs
|
|
//
|
|
// Contents: A class representing a rule-specific or reusable policy action to be performed if the PolicyConditions for a Policy Rule evaluate to TRUE. Since all operational details of a PolicyAction are provided in subclasses of this object, this class is abstract.
|
|
// This file was automatically generated from CIM_PolicyAction.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>
|
|
///A class representing a rule-specific or reusable policy action to be performed if the PolicyConditions for a Policy Rule evaluate to TRUE. Since all operational details of a PolicyAction are provided in subclasses of this object, this class is abstract.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PolicyAction")]
|
|
[System.Xml.Serialization.XmlRootAttribute("CIM_PolicyAction", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PolicyAction", IsNullable=false)]
|
|
public class CIM_PolicyAction : CIM_Policy
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public CIM_PolicyAction() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public CIM_PolicyAction(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 CIM_PolicyAction(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, CreationClassName indicates the name of the class or the subclass used in the creation of an instance. When used with the other key properties of this class, this property allows all instances of this class and its subclasses to be uniquely identified.
|
|
/// </summary>
|
|
[CimField(true, true)]
|
|
public virtual string CreationClassName
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("CreationClassName")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("CreationClassName",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove DoActionLogging field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveDoActionLogging()
|
|
{
|
|
RemoveField("DoActionLogging");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field DoActionLogging exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool DoActionLoggingExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("DoActionLogging");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, DoActionLogging causes a log message to be generated when the action is performed.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual bool DoActionLogging
|
|
{
|
|
get
|
|
{
|
|
return bool.Parse(this["DoActionLogging"][0]);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("DoActionLogging",value.ToString().ToLower(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, A user-friendly name of this PolicyAction.
|
|
/// </summary>
|
|
[CimField(true, true)]
|
|
public virtual string PolicyActionName
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("PolicyActionName")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("PolicyActionName",value);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, For a rule-specific PolicyAction, the CreationClassName of the PolicyRule object with which this Action is associated. For a reusable PolicyAction, a special value, 'NO RULE', should be used to indicate that this Action is reusable and not associated with a single PolicyRule.
|
|
/// </summary>
|
|
[CimField(true, true)]
|
|
public virtual string PolicyRuleCreationClassName
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("PolicyRuleCreationClassName")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("PolicyRuleCreationClassName",value);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, For a rule-specific PolicyAction, the name of the PolicyRule object with which this Action is associated. For a reusable PolicyAction, a special value, 'NO RULE', should be used to indicate that this Action is reusable and not associated with a single PolicyRule.
|
|
/// </summary>
|
|
[CimField(true, true)]
|
|
public virtual string PolicyRuleName
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("PolicyRuleName")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("PolicyRuleName",value);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, The name of the class or the subclass used in the creation of the System object in whose scope this PolicyAction is defined.
|
|
///
|
|
/// This property helps to identify the System object in whose scope this instance of PolicyAction exists. For a rule-specific PolicyAction, this is the System in whose context the PolicyRule is defined. For a reusable PolicyAction, this is the instance of PolicyRepository (which is a subclass of System) that holds the Action.
|
|
///
|
|
/// Note that this property, and the analogous property SystemName, do not represent propagated keys from an instance of the class System. Instead, they are properties defined in the context of this class, which repeat the values from the instance of System to which this PolicyAction is related, either directly via the PolicyActionInPolicyRepository association or indirectly via the PolicyActionInPolicyRule aggregation.
|
|
/// </summary>
|
|
[CimField(true, true)]
|
|
public virtual string SystemCreationClassName
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("SystemCreationClassName")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("SystemCreationClassName",value);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, The name of the System object in whose scope this PolicyAction is defined.
|
|
///
|
|
/// This property completes the identification of the System object in whose scope this instance of PolicyAction exists. For a rule-specific PolicyAction, this is the System in whose context the PolicyRule is defined. For a reusable PolicyAction, this is the instance of PolicyRepository (which is a subclass of System) that holds the Action.
|
|
/// </summary>
|
|
[CimField(true, true)]
|
|
public virtual string SystemName
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("SystemName")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("SystemName",value);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_PolicyAction class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <param name="cimKeys">Keys for selecting the instances</param>
|
|
/// <returns>Collection of CIM_PolicyAction objects</returns>
|
|
public static new Collection<CIM_PolicyAction> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<CIM_PolicyAction> ret = CimBase.Enumerate<CIM_PolicyAction>(client, cimKeys);
|
|
return new Collection<CIM_PolicyAction>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_PolicyAction class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of CIM_PolicyAction objects</returns>
|
|
public static new Collection<CIM_PolicyAction> Enumerate(IWSManClient client)
|
|
{
|
|
List<CIM_PolicyAction> ret = CimBase.Enumerate<CIM_PolicyAction>(client);
|
|
return new Collection<CIM_PolicyAction>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of CIM_PolicyAction 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<CIM_PolicyAction>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the CIM_PolicyAction class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CIM_Policy.CimKeys
|
|
{
|
|
/// <summary>
|
|
/// Key, Required, CreationClassName indicates the name of the class or the subclass used in the creation of an instance. When used with the other key properties of this class, this property allows all instances of this class and its subclasses to be uniquely identified.
|
|
/// </summary>
|
|
|
|
public virtual string CreationClassName
|
|
{
|
|
get
|
|
{
|
|
return GetKey("CreationClassName");
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("CreationClassName", value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Key, Required, A user-friendly name of this PolicyAction.
|
|
/// </summary>
|
|
|
|
public virtual string PolicyActionName
|
|
{
|
|
get
|
|
{
|
|
return GetKey("PolicyActionName");
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("PolicyActionName", value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Key, Required, For a rule-specific PolicyAction, the CreationClassName of the PolicyRule object with which this Action is associated. For a reusable PolicyAction, a special value, 'NO RULE', should be used to indicate that this Action is reusable and not associated with a single PolicyRule.
|
|
/// </summary>
|
|
|
|
public virtual string PolicyRuleCreationClassName
|
|
{
|
|
get
|
|
{
|
|
return GetKey("PolicyRuleCreationClassName");
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("PolicyRuleCreationClassName", value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Key, Required, For a rule-specific PolicyAction, the name of the PolicyRule object with which this Action is associated. For a reusable PolicyAction, a special value, 'NO RULE', should be used to indicate that this Action is reusable and not associated with a single PolicyRule.
|
|
/// </summary>
|
|
|
|
public virtual string PolicyRuleName
|
|
{
|
|
get
|
|
{
|
|
return GetKey("PolicyRuleName");
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("PolicyRuleName", value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Key, Required, The name of the class or the subclass used in the creation of the System object in whose scope this PolicyAction is defined.
|
|
///
|
|
/// This property helps to identify the System object in whose scope this instance of PolicyAction exists. For a rule-specific PolicyAction, this is the System in whose context the PolicyRule is defined. For a reusable PolicyAction, this is the instance of PolicyRepository (which is a subclass of System) that holds the Action.
|
|
///
|
|
/// Note that this property, and the analogous property SystemName, do not represent propagated keys from an instance of the class System. Instead, they are properties defined in the context of this class, which repeat the values from the instance of System to which this PolicyAction is related, either directly via the PolicyActionInPolicyRepository association or indirectly via the PolicyActionInPolicyRule aggregation.
|
|
/// </summary>
|
|
|
|
public virtual string SystemCreationClassName
|
|
{
|
|
get
|
|
{
|
|
return GetKey("SystemCreationClassName");
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("SystemCreationClassName", value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Key, Required, The name of the System object in whose scope this PolicyAction is defined.
|
|
///
|
|
/// This property completes the identification of the System object in whose scope this instance of PolicyAction exists. For a rule-specific PolicyAction, this is the System in whose context the PolicyRule is defined. For a reusable PolicyAction, this is the instance of PolicyRepository (which is a subclass of System) that holds the Action.
|
|
/// </summary>
|
|
|
|
public virtual string SystemName
|
|
{
|
|
get
|
|
{
|
|
return GetKey("SystemName");
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("SystemName", value);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|