//---------------------------------------------------------------------------- // // Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved. // // File: CIM_PolicySet.cs // // Contents: PolicySet is an abstract class that represents a set of policies that form a coherent set. The set of contained policies has a common decision strategy and a common set of policy roles (defined via the PolicySetInRole Collection association). Subclasses include PolicyGroup and PolicyRule. // This file was automatically generated from CIM_PolicySet.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 { /// ///PolicySet is an abstract class that represents a set of policies that form a coherent set. The set of contained policies has a common decision strategy and a common set of policy roles (defined via the PolicySetInRole Collection association). Subclasses include PolicyGroup and PolicyRule. /// [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PolicySet")] [System.Xml.Serialization.XmlRootAttribute("CIM_PolicySet", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PolicySet", IsNullable=false)] public class CIM_PolicySet : CIM_Policy { /// /// Default constructor. /// public CIM_PolicySet() :base() { } /// /// Constructor that recieves an xml string for deserialization. /// /// xml string to deserialize public CIM_PolicySet(string xml): base((IWSManClient)null) { this.Deserialize(xml); } /// /// Constructor which recieves a Ws-Management client object. /// /// Ws-Management client public CIM_PolicySet(IWSManClient client): base(client) { } /// /// Remove Enabled field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveEnabled() { RemoveField("Enabled"); } /// /// Is true if the field Enabled exists in the current object, /// otherwise is false. /// public virtual bool EnabledExist { get { return ContainsField("Enabled"); } } /// /// Optional, Indicates whether this PolicySet is administratively enabled, administratively disabled, or enabled for debug. The "EnabledForDebug" property value is deprecated and, when it or any value not understood by the receiver is specified, the receiving enforcement point treats the PolicySet as "Disabled". To determine if a PolicySet is "Enabled", the containment hierarchy specified by the PolicySetComponent aggregation is examined and the Enabled property values of the hierarchy are ANDed together. Thus, for example, everything aggregated by a PolicyGroup may be disabled by setting the Enabled property in the PolicyGroup instance to "Disabled" without changing the Enabled property values of any of the aggregated instances. The default value is 1 ("Enabled"). /// [CimField(false, false)] public virtual ushort Enabled { get { return ushort.Parse(this["Enabled"][0], CultureInfo.InvariantCulture); } set { this.SetOrAddField("Enabled",value.ToString(CultureInfo.InvariantCulture)); } } /// /// Remove PolicyDecisionStrategy field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemovePolicyDecisionStrategy() { RemoveField("PolicyDecisionStrategy"); } /// /// Is true if the field PolicyDecisionStrategy exists in the current object, /// otherwise is false. /// public virtual bool PolicyDecisionStrategyExist { get { return ContainsField("PolicyDecisionStrategy"); } } /// /// Optional, PolicyDecisionStrategy defines the evaluation method used for policies contained in the PolicySet. There are two values currently defined: /// - 'First Matching' (1) executes the actions of the first rule whose conditions evaluate to TRUE. The concept of 'first' is determined by examining the priority of the rule within the policy set (i.e., by examining the property, PolicySetComponent.Priority). Note that this ordering property MUST be maintained when processing the PolicyDecisionStrategy. /// - 'All' (2) executes the actions of ALL rules whose conditions evaluate to TRUE, in the set. As noted above, the order of processing of the rules is defined by the property, PolicySetComponent.Priority (and within a rule, the ordering of the actions is defined by the property, PolicyActionStructure.ActionOrder). Note that when this strategy is defined, processing MUST be completed of ALL rules whose conditions evaluate to TRUE, regardless of errors in the execution of the rule actions. /// [CimField(false, false)] public virtual ushort PolicyDecisionStrategy { get { return ushort.Parse(this["PolicyDecisionStrategy"][0], CultureInfo.InvariantCulture); } set { this.SetOrAddField("PolicyDecisionStrategy",value.ToString(CultureInfo.InvariantCulture)); } } /// /// Remove PolicyRoles field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemovePolicyRoles() { RemoveField("PolicyRoles"); } /// /// Is true if the field PolicyRoles exists in the current object, /// otherwise is false. /// public virtual bool PolicyRolesExist { get { return ContainsField("PolicyRoles"); } } /// /// Optional, The PolicyRoles property represents the roles associated with a PolicySet. All contained PolicySet instances inherit the values of the PolicyRoles of the aggregating PolicySet but the values are not copied. A contained PolicySet instance may, however, add additional PolicyRoles to those it inherits from its aggregating PolicySet(s). Each value in PolicyRoles multi-valued property represents a role for which the PolicySet applies, i.e., the PolicySet should be used by any enforcement point that assumes any of the listed PolicyRoles values. /// /// Although not officially designated as 'role combinations', multiple roles may be specified using the form: /// <RoleName>[&&<RoleName>]* /// where the individual role names appear in alphabetical order (according to the collating sequence for UCS-2). Implementations may treat PolicyRoles values that are specified as 'role combinations' as simple strings. /// /// This property is deprecated in lieu of the use of an association, CIM_PolicySetInRoleCollection. The latter is a more explicit and less error-prone approach to modeling that a PolicySet has one or more PolicyRoles. /// [CimField(false, false)] public virtual string[] PolicyRoles { get { return CimTypesUtils.StringArrayToArray(this["PolicyRoles"]); } set { string[] arr = CimTypesUtils.ArrayToStringArray(value); this.SetOrAddField("PolicyRoles", arr); } } /// /// Enumerate instances of CIM_PolicySet class at an endpoint. /// /// WS-Management client /// Keys for selecting the instances /// Collection of CIM_PolicySet objects public static new Collection Enumerate(IWSManClient client, CimBase.CimKeys cimKeys) { List ret = CimBase.Enumerate(client, cimKeys); return new Collection(ret); } /// /// Enumerate instances of CIM_PolicySet class at an endpoint. /// /// WS-Management client /// Collection of CIM_PolicySet objects public static new Collection Enumerate(IWSManClient client) { List ret = CimBase.Enumerate(client); return new Collection(ret); } /// /// Delete the instance of CIM_PolicySet 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 CIM_PolicySet class. /// public new class CimKeys : CIM_Policy.CimKeys { } } }