//---------------------------------------------------------------------------- // // Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved. // // File: AMT_NetworkPortDefaultSystemDefensePolicy.cs // // Contents: Associates a Network Interface with a System DefensePolicy. An existing association implies that the System Defense Policy is the default policy for the specified interface. It will be activated when no other policies are enabled for that interface. // This file was automatically generated from AMT_NetworkPortDefaultSystemDefensePolicy.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 { /// ///Associates a Network Interface with a System DefensePolicy. An existing association implies that the System Defense Policy is the default policy for the specified interface. It will be activated when no other policies are enabled for that interface. /// [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_NetworkPortDefaultSystemDefensePolicy")] [System.Xml.Serialization.XmlRootAttribute("AMT_NetworkPortDefaultSystemDefensePolicy", Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_NetworkPortDefaultSystemDefensePolicy", IsNullable=false)] public class AMT_NetworkPortDefaultSystemDefensePolicy : CIM_Dependency { /// /// Default constructor. /// public AMT_NetworkPortDefaultSystemDefensePolicy() :base() { } /// /// Constructor that recieves an xml string for deserialization. /// /// xml string to deserialize public AMT_NetworkPortDefaultSystemDefensePolicy(string xml): base((IWSManClient)null) { this.Deserialize(xml); } /// /// Constructor which recieves a Ws-Management client object. /// /// Ws-Management client public AMT_NetworkPortDefaultSystemDefensePolicy(IWSManClient client): base(client) { } /// /// Remove Active field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveActive() { RemoveField("Active"); } /// /// Is true if the field Active exists in the current object, /// otherwise is false. /// public virtual bool ActiveExist { get { return ContainsField("Active"); } } /// /// Optional, Specifies whether this Policy is Active on the network interface. /// [CimField(false, false)] public virtual bool Active { get { return bool.Parse(this["Active"][0]); } set { this.SetOrAddField("Active",value.ToString().ToLower(CultureInfo.InvariantCulture)); } } /// /// Key, Required, References a CIM_EthernetPort object representing the interface. /// [CimField(true, false)] public override CimReference Antecedent { get { string innerXML = this.GetField("Antecedent")[0]; CimReference epr = new CimReference("Antecedent", XmlNamespace, innerXML); return epr; } set { this.SetOrAddField("Antecedent",value.Serialize(false)); } } /// /// Key, Required, References an AMT_SystemDefensePolicy object. /// [CimField(true, false)] public override CimReference Dependent { get { string innerXML = this.GetField("Dependent")[0]; CimReference epr = new CimReference("Dependent", XmlNamespace, innerXML); return epr; } set { this.SetOrAddField("Dependent",value.Serialize(false)); } } /// /// Enumerate instances of AMT_NetworkPortDefaultSystemDefensePolicy class at an endpoint. /// /// WS-Management client /// Keys for selecting the instances /// Collection of AMT_NetworkPortDefaultSystemDefensePolicy 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_NetworkPortDefaultSystemDefensePolicy class at an endpoint. /// /// WS-Management client /// Collection of AMT_NetworkPortDefaultSystemDefensePolicy objects public static new Collection Enumerate(IWSManClient client) { List ret = CimBase.Enumerate(client); return new Collection(ret); } /// /// Delete the instance of AMT_NetworkPortDefaultSystemDefensePolicy 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_NetworkPortDefaultSystemDefensePolicy class. /// public new class CimKeys : CIM_Dependency.CimKeys { /// /// Key, Required, References a CIM_EthernetPort object representing the interface. /// public virtual CimReference Antecedent { get { string innerXML = GetKey("Antecedent"); CimReference epr = new CimReference("Antecedent", "http://intel.com/wbem/wscim/1/amt-schema/1/AMT_NetworkPortDefaultSystemDefensePolicy", innerXML); return epr; } set { SetOrAddKey("Antecedent", value); } } /// /// Key, Required, References an AMT_SystemDefensePolicy object. /// public virtual CimReference Dependent { get { string innerXML = GetKey("Dependent"); CimReference epr = new CimReference("Dependent", "http://intel.com/wbem/wscim/1/amt-schema/1/AMT_NetworkPortDefaultSystemDefensePolicy", innerXML); return epr; } set { SetOrAddKey("Dependent", value); } } } } }