170 lines
6.2 KiB
C#

//----------------------------------------------------------------------------
//
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
//
// File: AMT_RemoteAccessPolicyRule.cs
//
// Contents: Represents a Remote Access policy. The policy defines a condition that will trigger the establishment of a tunnel between the Intel(R) AMT subsystem and a remote MpServer. The policy also defines parameters for the connection such as TunnelLifeTime in seconds.
// This file was automatically generated from AMT_RemoteAccessPolicyRule.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>
///Represents a Remote Access policy. The policy defines a condition that will trigger the establishment of a tunnel between the Intel(R) AMT subsystem and a remote MpServer. The policy also defines parameters for the connection such as TunnelLifeTime in seconds.
/// </summary>
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_RemoteAccessPolicyRule")]
[System.Xml.Serialization.XmlRootAttribute("AMT_RemoteAccessPolicyRule", Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_RemoteAccessPolicyRule", IsNullable=false)]
public class AMT_RemoteAccessPolicyRule : CIM_PolicyRule
{
/// <summary>
/// Default constructor.
/// </summary>
public AMT_RemoteAccessPolicyRule() :base()
{
}
/// <summary>
/// Constructor that recieves an xml string for deserialization.
/// </summary>
/// <param name="xml">xml string to deserialize</param>
public AMT_RemoteAccessPolicyRule(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 AMT_RemoteAccessPolicyRule(IWSManClient client): base(client)
{
}
/// <summary>
/// Remove ExtendedData field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveExtendedData()
{
RemoveField("ExtendedData");
}
/// <summary>
/// Is true if the field ExtendedData exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool ExtendedDataExist
{
get
{
return ContainsField("ExtendedData");
}
}
/// <summary>
/// Optional, Data associated with the policy, up to 32 bytes. The data should be in a network order. The extended data for a policy with a periodic trigger contains first a periodic type and after that the data for that type. For periodic type 0 [Interval - The CIRA connection will be established every fixed number of seconds] - the data should include a uint32 value that indicates the time period in seconds between tunnel establishments. For periodic type 1 [Daily - The CIRA connection will be established every day in a specific pre-defined time (hour and minutes)] - the data should include two uint32 values which define the wanted hour of the day and minutes of that hour. For the other triggers extended data is not defined and not needed. The length and data should be zero.
/// </summary>
[CimField(false, false)]
public virtual byte[] ExtendedData
{
get
{
return Convert.FromBase64String(this.GetField("ExtendedData")[0]); }
set
{
this.SetOrAddField("ExtendedData",Convert.ToBase64String(value));
}
}
/// <summary>
/// Required, The event that will trigger the establishment of the remote connection to the MpServer.
/// </summary>
[CimField(false, true)]
public virtual ushort Trigger
{
get
{
return ushort.Parse(this["Trigger"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("Trigger",value.ToString(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Required, Defines the tunnel lifetime in seconds, 0 means no lifetime- the tunnel should stay open until it is closed by CloseRemoteAccessConnection or when a different policy with higher priority needs to be processed.
/// </summary>
[CimField(false, true)]
public virtual uint TunnelLifeTime
{
get
{
return uint.Parse(this["TunnelLifeTime"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("TunnelLifeTime",value.ToString(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Enumerate instances of AMT_RemoteAccessPolicyRule class at an endpoint.
/// </summary>
/// <param name="client">WS-Management client</param>
/// <param name="cimKeys">Keys for selecting the instances</param>
/// <returns>Collection of AMT_RemoteAccessPolicyRule objects</returns>
public static new Collection<AMT_RemoteAccessPolicyRule> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
{
List<AMT_RemoteAccessPolicyRule> ret = CimBase.Enumerate<AMT_RemoteAccessPolicyRule>(client, cimKeys);
return new Collection<AMT_RemoteAccessPolicyRule>(ret);
}
/// <summary>
/// Enumerate instances of AMT_RemoteAccessPolicyRule class at an endpoint.
/// </summary>
/// <param name="client">WS-Management client</param>
/// <returns>Collection of AMT_RemoteAccessPolicyRule objects</returns>
public static new Collection<AMT_RemoteAccessPolicyRule> Enumerate(IWSManClient client)
{
List<AMT_RemoteAccessPolicyRule> ret = CimBase.Enumerate<AMT_RemoteAccessPolicyRule>(client);
return new Collection<AMT_RemoteAccessPolicyRule>(ret);
}
/// <summary>
/// Delete the instance of AMT_RemoteAccessPolicyRule 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<AMT_RemoteAccessPolicyRule>(client);
}
/// <summary>
/// Represents the keys of the AMT_RemoteAccessPolicyRule class.
/// </summary>
public new class CimKeys : CIM_PolicyRule.CimKeys
{
}
}
}