//----------------------------------------------------------------------------
//
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
//
// File: AMT_SystemDefensePolicy.cs
//
// Contents: Describes a System Defense Policy
// This file was automatically generated from AMT_SystemDefensePolicy.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
{
///
///Describes a System Defense Policy
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemDefensePolicy")]
[System.Xml.Serialization.XmlRootAttribute("AMT_SystemDefensePolicy", Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemDefensePolicy", IsNullable=false)]
public class AMT_SystemDefensePolicy : CIM_ManagedElement
{
///
/// Default constructor.
///
public AMT_SystemDefensePolicy() :base()
{
}
///
/// Constructor that recieves an xml string for deserialization.
///
/// xml string to deserialize
public AMT_SystemDefensePolicy(string xml): base((IWSManClient)null)
{
this.Deserialize(xml);
}
///
/// Constructor which recieves a Ws-Management client object.
///
/// Ws-Management client
public AMT_SystemDefensePolicy(IWSManClient client): base(client)
{
}
///
/// Remove AntiSpoofingSupport field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveAntiSpoofingSupport()
{
RemoveField("AntiSpoofingSupport");
}
///
/// Is true if the field AntiSpoofingSupport exists in the current object,
/// otherwise is false.
///
public virtual bool AntiSpoofingSupportExist
{
get
{
return ContainsField("AntiSpoofingSupport");
}
}
///
/// Optional, Anti Spoofing has the highest priority for blocking. Any packet that does NOT pass AS filter will not be transmitted even if it passes other filters. Any packet that does pass the AS filter is subject to the rest of the CB filters before it is transmitted.
///
[CimField(false, false)]
public virtual uint AntiSpoofingSupport
{
get
{
return uint.Parse(this["AntiSpoofingSupport"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("AntiSpoofingSupport",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Remove FilterCreationHandles field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveFilterCreationHandles()
{
RemoveField("FilterCreationHandles");
}
///
/// Is true if the field FilterCreationHandles exists in the current object,
/// otherwise is false.
///
public virtual bool FilterCreationHandlesExist
{
get
{
return ContainsField("FilterCreationHandles");
}
}
///
/// Optional, A list of Filter Creation Handles to be included in the Policy.
///
[CimField(false, false)]
public virtual uint[] FilterCreationHandles
{
get
{
return CimTypesUtils.StringArrayToArray(this["FilterCreationHandles"]);
}
set
{
string[] arr = CimTypesUtils.ArrayToStringArray(value);
this.SetOrAddField("FilterCreationHandles", arr);
}
}
///
/// Key, Required, Opaquely and uniquely identifies an instance of this class.
///
[CimField(true, true)]
public override string InstanceID
{
get
{
return this.GetField("InstanceID")[0];
}
set
{
this.SetOrAddField("InstanceID",value);
}
}
///
/// Remove PolicyName field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemovePolicyName()
{
RemoveField("PolicyName");
}
///
/// Is true if the field PolicyName exists in the current object,
/// otherwise is false.
///
public virtual bool PolicyNameExist
{
get
{
return ContainsField("PolicyName");
}
}
///
/// Optional, Policy name.
///
[CimField(false, false)]
public virtual string PolicyName
{
get
{
return this.GetField("PolicyName")[0];
}
set
{
this.SetOrAddField("PolicyName",value);
}
}
///
/// Required, In case multiple policies are being activated simultaneously, the policy with the highest precedence value takes effect. (Policies with the same precedence are chosen arbitrarily).
///
[CimField(false, true)]
public virtual uint PolicyPrecedence
{
get
{
return uint.Parse(this["PolicyPrecedence"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("PolicyPrecedence",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Required, Specifies whether to count filter matches. (Specifying TRUE in this action will consume one extra counter from the counter resources of the Policy).
///
[CimField(false, true)]
public virtual bool RxDefaultCount
{
get
{
return bool.Parse(this["RxDefaultCount"][0]);
}
set
{
this.SetOrAddField("RxDefaultCount",value.ToString().ToLower(CultureInfo.InvariantCulture));
}
}
///
/// Required, Specifies whether the RX packet should be dropped on filter match.
///
[CimField(false, true)]
public virtual bool RxDefaultDrop
{
get
{
return bool.Parse(this["RxDefaultDrop"][0]);
}
set
{
this.SetOrAddField("RxDefaultDrop",value.ToString().ToLower(CultureInfo.InvariantCulture));
}
}
///
/// Required, Specifies whether an Event should be created in the Event Manager when this filter is matched. (The event will be generated once and will be allowed again only after statistics are read).
///
[CimField(false, true)]
public virtual bool RxDefaultMatchEvent
{
get
{
return bool.Parse(this["RxDefaultMatchEvent"][0]);
}
set
{
this.SetOrAddField("RxDefaultMatchEvent",value.ToString().ToLower(CultureInfo.InvariantCulture));
}
}
///
/// Required, Specifies whether to count filter matches. (Specifying TRUE in this action will consume one extra counter from the counter resources of the Policy).
///
[CimField(false, true)]
public virtual bool TxDefaultCount
{
get
{
return bool.Parse(this["TxDefaultCount"][0]);
}
set
{
this.SetOrAddField("TxDefaultCount",value.ToString().ToLower(CultureInfo.InvariantCulture));
}
}
///
/// Required, Specifies whether the TX packet should be dropped on filter match.
///
[CimField(false, true)]
public virtual bool TxDefaultDrop
{
get
{
return bool.Parse(this["TxDefaultDrop"][0]);
}
set
{
this.SetOrAddField("TxDefaultDrop",value.ToString().ToLower(CultureInfo.InvariantCulture));
}
}
///
/// Required, Specifies whether an Event should be created in the Event Manager when this filter is matched. (The event will be generated once and will be allowed again only after statistics are read).
///
[CimField(false, true)]
public virtual bool TxDefaultMatchEvent
{
get
{
return bool.Parse(this["TxDefaultMatchEvent"][0]);
}
set
{
this.SetOrAddField("TxDefaultMatchEvent",value.ToString().ToLower(CultureInfo.InvariantCulture));
}
}
///
///Get the timeout parameter.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemDefensePolicy", IsNullable=false)]
private class GetTimeout_INPUT : CimParams
{
public GetTimeout_INPUT(string ns) : base(ns)
{
}
}
///
///Get the timeout parameter.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemDefensePolicy", IsNullable=false)]
private class GetTimeout_OUTPUT : CimParams
{
public GetTimeout_OUTPUT() : base("")
{
}
///
/// Optional, The timeout of the policy (timeout is measured in minutes, and 0 means no timeout).
///
[CimField(false,false)]
public virtual uint Timeout
{
get
{
return uint.Parse(this["Timeout"][0], CultureInfo.InvariantCulture);
}
}
}
///
///Get the timeout parameter.
///
/// OUT - The timeout of the policy (timeout is measured in minutes, and 0 means no timeout).
///
///
public virtual uint GetTimeout(out uint outTimeout)
{
GetTimeout_INPUT input = new GetTimeout_INPUT(this.XmlNamespace);
GetTimeout_OUTPUT output = new GetTimeout_OUTPUT();
uint returnValue = base.Invoke("GetTimeout",input,out output);
outTimeout=0;
if (returnValue == 0)
{
if (output.ContainsField("Timeout"))
outTimeout = output.Timeout;
}
return returnValue;
}
///
///Set the timeout parameter.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemDefensePolicy", IsNullable=false)]
private class SetTimeout_INPUT : CimParams
{
public SetTimeout_INPUT(string ns) : base(ns)
{
}
///
/// Required, The timeout for the policy (measured in minutes, and 0 means no timeout).
///
[CimField(false,true)]
public virtual uint Timeout
{
set
{
this.SetOrAddField("Timeout",value.ToString(CultureInfo.InvariantCulture));
}
}
}
///
///Set the timeout parameter.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemDefensePolicy", IsNullable=false)]
private class SetTimeout_OUTPUT : CimParams
{
public SetTimeout_OUTPUT() : base("")
{
}
}
///
///Set the timeout parameter.
///
/// Required, IN -The timeout for the policy (measured in minutes, and 0 means no timeout).
///
/// Legal values:
/// PT_STATUS_SUCCESS : 0
/// PT_STATUS_INVALID_PARAMETER : 36
/// PT_STATUS_FLASH_WRITE_LIMIT_EXCEEDED : 38
///
public virtual uint SetTimeout(uint? inTimeout)
{
SetTimeout_INPUT input = new SetTimeout_INPUT(this.XmlNamespace);
if (inTimeout.HasValue)
input.Timeout=inTimeout.Value;
SetTimeout_OUTPUT output = new SetTimeout_OUTPUT();
uint returnValue = base.Invoke("SetTimeout",input,out output);
return returnValue;
}
///
///Updates the statistics objects with new data.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemDefensePolicy", IsNullable=false)]
private class UpdateStatistics_INPUT : CimParams
{
public UpdateStatistics_INPUT(string ns) : base(ns)
{
}
///
/// Required, EPR to the CIM_EthernetPort object representing the interface for which to update statistics
///
[CimField(false,false)]
public virtual CimReference NetworkInterface
{
set
{
this.SetOrAddField("NetworkInterface",value.Serialize(false));
}
}
///
/// Required, Causes statistics to be resetted
///
[CimField(false,true)]
public virtual bool ResetOnRead
{
set
{
this.SetOrAddField("ResetOnRead",value.ToString().ToLower(CultureInfo.InvariantCulture));
}
}
}
///
///Updates the statistics objects with new data.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemDefensePolicy", IsNullable=false)]
private class UpdateStatistics_OUTPUT : CimParams
{
public UpdateStatistics_OUTPUT() : base("")
{
}
}
///
///Updates the statistics objects with new data.
///
/// Required, IN -EPR to the CIM_EthernetPort object representing the interface for which to update statistics
/// Required, IN -Causes statistics to be resetted
///
/// Legal values:
/// Success : 0
/// Policy not active : 1
/// Invalid parameter : 2
///
public virtual uint UpdateStatistics(CimReference inNetworkInterface,bool? inResetOnRead)
{
UpdateStatistics_INPUT input = new UpdateStatistics_INPUT(this.XmlNamespace);
if (inNetworkInterface != null)
input.NetworkInterface=inNetworkInterface;
if (inResetOnRead.HasValue)
input.ResetOnRead=inResetOnRead.Value;
UpdateStatistics_OUTPUT output = new UpdateStatistics_OUTPUT();
uint returnValue = base.Invoke("UpdateStatistics",input,out output);
return returnValue;
}
///
/// Enumerate instances of AMT_SystemDefensePolicy class at an endpoint.
///
/// WS-Management client
/// Keys for selecting the instances
/// Collection of AMT_SystemDefensePolicy 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_SystemDefensePolicy class at an endpoint.
///
/// WS-Management client
/// Collection of AMT_SystemDefensePolicy objects
public static new Collection Enumerate(IWSManClient client)
{
List ret = CimBase.Enumerate(client);
return new Collection(ret);
}
///
/// Delete the instance of AMT_SystemDefensePolicy 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_SystemDefensePolicy class.
///
public new class CimKeys : CIM_ManagedElement.CimKeys
{
///
/// Key, Required, Opaquely and uniquely identifies an instance of this class.
///
public virtual string InstanceID
{
get
{
return GetKey("InstanceID");
}
set
{
SetOrAddKey("InstanceID", value);
}
}
}
}
}