//---------------------------------------------------------------------------- // // Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved. // // File: CIM_Policy.cs // // Contents: An abstract class defining the common properties of the policy managed elements derived from CIM_Policy. The subclasses are used to create rules and groups of rules that work together to form a coherent set of policies within an administrative domain or set of domains. // This file was automatically generated from CIM_Policy.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 { /// ///An abstract class defining the common properties of the policy managed elements derived from CIM_Policy. The subclasses are used to create rules and groups of rules that work together to form a coherent set of policies within an administrative domain or set of domains. /// [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Policy")] [System.Xml.Serialization.XmlRootAttribute("CIM_Policy", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Policy", IsNullable=false)] public class CIM_Policy : CIM_ManagedElement { /// /// Default constructor. /// public CIM_Policy() :base() { } /// /// Constructor that recieves an xml string for deserialization. /// /// xml string to deserialize public CIM_Policy(string xml): base((IWSManClient)null) { this.Deserialize(xml); } /// /// Constructor which recieves a Ws-Management client object. /// /// Ws-Management client public CIM_Policy(IWSManClient client): base(client) { } /// /// Remove CommonName field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveCommonName() { RemoveField("CommonName"); } /// /// Is true if the field CommonName exists in the current object, /// otherwise is false. /// public virtual bool CommonNameExist { get { return ContainsField("CommonName"); } } /// /// Optional, A user-friendly name of this policy-related object. /// [CimField(false, false)] public virtual string CommonName { get { return this.GetField("CommonName")[0]; } set { this.SetOrAddField("CommonName",value); } } /// /// Remove PolicyKeywords field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemovePolicyKeywords() { RemoveField("PolicyKeywords"); } /// /// Is true if the field PolicyKeywords exists in the current object, /// otherwise is false. /// public virtual bool PolicyKeywordsExist { get { return ContainsField("PolicyKeywords"); } } /// /// Optional, An array of keywords for characterizing / categorizing policy objects. Keywords are of one of two types: /// - Keywords defined in this and other MOFs, or in DMTF white papers. These keywords provide a vendor- independent, installation-independent way of characterizing policy objects. /// - Installation-dependent keywords for characterizing policy objects. Examples include 'Engineering', 'Billing', and 'Review in December 2000'. /// This MOF defines the following keywords: 'UNKNOWN', 'CONFIGURATION', 'USAGE', 'SECURITY', 'SERVICE', 'MOTIVATIONAL', 'INSTALLATION', and 'EVENT'. These concepts are self-explanatory and are further discussed in the SLA/Policy White Paper. One additional keyword is defined: 'POLICY'. The role of this keyword is to identify policy-related instances that may not be otherwise identifiable, in some implementations. The keyword 'POLICY' is NOT mutually exclusive of the other keywords specified above. /// [CimField(false, false)] public virtual string[] PolicyKeywords { get { return CimTypesUtils.StringArrayToArray(this["PolicyKeywords"]); } set { string[] arr = CimTypesUtils.ArrayToStringArray(value); this.SetOrAddField("PolicyKeywords", arr); } } /// /// Enumerate instances of CIM_Policy class at an endpoint. /// /// WS-Management client /// Keys for selecting the instances /// Collection of CIM_Policy 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_Policy class at an endpoint. /// /// WS-Management client /// Collection of CIM_Policy objects public static new Collection Enumerate(IWSManClient client) { List ret = CimBase.Enumerate(client); return new Collection(ret); } /// /// Delete the instance of CIM_Policy 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_Policy class. /// public new class CimKeys : CIM_ManagedElement.CimKeys { } } }