467 lines
17 KiB
C#
467 lines
17 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: AMT_EndpointAccessControlService.cs
|
|
//
|
|
// Contents: A AMT_EndpointAccessControlService is a Logical Element that contains the information necessary to represent and manage the functionality provided by a the Endpoint Access Control manager of Intel(R) AMT.
|
|
// This file was automatically generated from AMT_EndpointAccessControlService.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>
|
|
///A AMT_EndpointAccessControlService is a Logical Element that contains the information necessary to represent and manage the functionality provided by a the Endpoint Access Control manager of Intel(R) AMT.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_EndpointAccessControlService")]
|
|
[System.Xml.Serialization.XmlRootAttribute("AMT_EndpointAccessControlService", Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_EndpointAccessControlService", IsNullable=false)]
|
|
public class AMT_EndpointAccessControlService : CIM_Service
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public AMT_EndpointAccessControlService() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public AMT_EndpointAccessControlService(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_EndpointAccessControlService(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
/// <summary>
|
|
///This method returns (and optionally updates) the EAC posture for the Intel(R) AMT device.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_EndpointAccessControlService", IsNullable=false)]
|
|
private class GetPosture_INPUT : CimParams
|
|
{
|
|
public GetPosture_INPUT(string ns) : base(ns)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Required, The posture type to be generated.
|
|
/// </summary>
|
|
[CimField(false,true)]
|
|
public virtual ushort PostureType
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("PostureType",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///This method returns (and optionally updates) the EAC posture for the Intel(R) AMT device.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_EndpointAccessControlService", IsNullable=false)]
|
|
private class GetPosture_OUTPUT : CimParams
|
|
{
|
|
public GetPosture_OUTPUT() : base("")
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, BLOB representation of a Signed NAC Posture data block.
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual byte[] SignedPosture
|
|
{
|
|
get
|
|
{
|
|
return Convert.FromBase64String(this.GetField("SignedPosture")[0]); }
|
|
}
|
|
/// <summary>
|
|
/// Optional, A computed hash value over the posture data (fields like current time is omitted). This hash can be used to check if the posture was changed, comparing to the last computed hash value.
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual byte[] PostureChangeHash
|
|
{
|
|
get
|
|
{
|
|
return Convert.FromBase64String(this.GetField("PostureChangeHash")[0]); }
|
|
}
|
|
}
|
|
/// <summary>
|
|
///This method returns (and optionally updates) the EAC posture for the Intel(R) AMT device.
|
|
/// </summary>
|
|
/// <param name="inPostureType">Required, IN -The posture type to be generated.</param>
|
|
/// <param name="outSignedPosture">OUT - BLOB representation of a Signed NAC Posture data block.</param>
|
|
/// <param name="outPostureChangeHash">OUT - A computed hash value over the posture data (fields like current time is omitted). This hash can be used to check if the posture was changed, comparing to the last computed hash value.</param>
|
|
/// <returns>
|
|
/// Legal values:
|
|
/// PT_STATUS_SUCCESS : 0
|
|
/// PT_STATUS_INTERNAL_ERROR : 1
|
|
/// PT_STATUS_INVALID_PARAMETER : 36
|
|
/// PT_STATUS_NO_ASSOCIATION : 2072
|
|
/// </returns>
|
|
public virtual uint GetPosture(ushort? inPostureType,out byte[] outSignedPosture,out byte[] outPostureChangeHash)
|
|
{
|
|
GetPosture_INPUT input = new GetPosture_INPUT(this.XmlNamespace);
|
|
if (inPostureType.HasValue)
|
|
input.PostureType=inPostureType.Value;
|
|
GetPosture_OUTPUT output = new GetPosture_OUTPUT();
|
|
uint returnValue = base.Invoke("GetPosture",input,out output);
|
|
outSignedPosture=null;
|
|
outPostureChangeHash=null;
|
|
if (returnValue == 0)
|
|
{
|
|
if (output.ContainsField("SignedPosture"))
|
|
outSignedPosture = output.SignedPosture;
|
|
if (output.ContainsField("PostureChangeHash"))
|
|
outPostureChangeHash = output.PostureChangeHash;
|
|
}
|
|
return returnValue;
|
|
}
|
|
/// <summary>
|
|
///This method returns an hash of the currently available posture for the Intel(R) AMT device, which can be compared to hash values from previous results to detect differences.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_EndpointAccessControlService", IsNullable=false)]
|
|
private class GetPostureHash_INPUT : CimParams
|
|
{
|
|
public GetPostureHash_INPUT(string ns) : base(ns)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Required, The posture type to be generated.
|
|
/// </summary>
|
|
[CimField(false,true)]
|
|
public virtual ushort PostureType
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("PostureType",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///This method returns an hash of the currently available posture for the Intel(R) AMT device, which can be compared to hash values from previous results to detect differences.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_EndpointAccessControlService", IsNullable=false)]
|
|
private class GetPostureHash_OUTPUT : CimParams
|
|
{
|
|
public GetPostureHash_OUTPUT() : base("")
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, A computed hash value over the posture data (fields like current time is omitted). This hash can be used to check if the posture was changed, comparing to the last computed hash value.
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual byte[] PostureChangeHash
|
|
{
|
|
get
|
|
{
|
|
return Convert.FromBase64String(this.GetField("PostureChangeHash")[0]); }
|
|
}
|
|
}
|
|
/// <summary>
|
|
///This method returns an hash of the currently available posture for the Intel(R) AMT device, which can be compared to hash values from previous results to detect differences.
|
|
/// </summary>
|
|
/// <param name="inPostureType">Required, IN -The posture type to be generated.</param>
|
|
/// <param name="outPostureChangeHash">OUT - A computed hash value over the posture data (fields like current time is omitted). This hash can be used to check if the posture was changed, comparing to the last computed hash value.</param>
|
|
/// <returns>
|
|
/// Legal values:
|
|
/// PT_STATUS_SUCCESS : 0
|
|
/// PT_STATUS_INTERNAL_ERROR : 1
|
|
/// PT_STATUS_INVALID_PARAMETER : 36
|
|
/// PT_STATUS_NO_ASSOCIATION : 2072
|
|
/// </returns>
|
|
public virtual uint GetPostureHash(ushort? inPostureType,out byte[] outPostureChangeHash)
|
|
{
|
|
GetPostureHash_INPUT input = new GetPostureHash_INPUT(this.XmlNamespace);
|
|
if (inPostureType.HasValue)
|
|
input.PostureType=inPostureType.Value;
|
|
GetPostureHash_OUTPUT output = new GetPostureHash_OUTPUT();
|
|
uint returnValue = base.Invoke("GetPostureHash",input,out output);
|
|
outPostureChangeHash=null;
|
|
if (returnValue == 0)
|
|
{
|
|
if (output.ContainsField("PostureChangeHash"))
|
|
outPostureChangeHash = output.PostureChangeHash;
|
|
}
|
|
return returnValue;
|
|
}
|
|
/// <summary>
|
|
///This command tells the Intel AMT device to reset its boot counters and Agent Presence state counters.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_EndpointAccessControlService", IsNullable=false)]
|
|
private class UpdatePostureState_INPUT : CimParams
|
|
{
|
|
public UpdatePostureState_INPUT(string ns) : base(ns)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Required, The posture element to be updated.
|
|
/// </summary>
|
|
[CimField(false,true)]
|
|
public virtual ushort UpdateType
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("UpdateType",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///This command tells the Intel AMT device to reset its boot counters and Agent Presence state counters.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_EndpointAccessControlService", IsNullable=false)]
|
|
private class UpdatePostureState_OUTPUT : CimParams
|
|
{
|
|
public UpdatePostureState_OUTPUT() : base("")
|
|
{
|
|
}
|
|
|
|
}
|
|
/// <summary>
|
|
///This command tells the Intel AMT device to reset its boot counters and Agent Presence state counters.
|
|
/// </summary>
|
|
/// <param name="inUpdateType">Required, IN -The posture element to be updated.</param>
|
|
/// <returns>
|
|
/// Legal values:
|
|
/// PT_STATUS_SUCCESS : 0
|
|
/// PT_STATUS_INTERNAL_ERROR : 1
|
|
/// PT_STATUS_INVALID_PARAMETER : 36
|
|
/// PT_STATUS_AUDIT_FAIL : 2075
|
|
/// </returns>
|
|
public virtual uint UpdatePostureState(ushort? inUpdateType)
|
|
{
|
|
UpdatePostureState_INPUT input = new UpdatePostureState_INPUT(this.XmlNamespace);
|
|
if (inUpdateType.HasValue)
|
|
input.UpdateType=inUpdateType.Value;
|
|
UpdatePostureState_OUTPUT output = new UpdatePostureState_OUTPUT();
|
|
uint returnValue = base.Invoke("UpdatePostureState",input,out output);
|
|
return returnValue;
|
|
}
|
|
/// <summary>
|
|
///This method returns EAC options for the Intel(R) AMT device.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_EndpointAccessControlService", IsNullable=false)]
|
|
private class GetEacOptions_INPUT : CimParams
|
|
{
|
|
public GetEacOptions_INPUT(string ns) : base(ns)
|
|
{
|
|
}
|
|
|
|
}
|
|
/// <summary>
|
|
///This method returns EAC options for the Intel(R) AMT device.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_EndpointAccessControlService", IsNullable=false)]
|
|
private class GetEacOptions_OUTPUT : CimParams
|
|
{
|
|
public GetEacOptions_OUTPUT() : base("")
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Enabled EAC Vendors
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual uint EacVendors
|
|
{
|
|
get
|
|
{
|
|
return uint.Parse(this["EacVendors"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Optional, Posture Hash Type
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual uint PostureHashAlgorithm
|
|
{
|
|
get
|
|
{
|
|
return uint.Parse(this["PostureHashAlgorithm"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///This method returns EAC options for the Intel(R) AMT device.
|
|
/// </summary>
|
|
/// <param name="outEacVendors">OUT - Enabled EAC Vendors</param>
|
|
/// <param name="outPostureHashAlgorithm">OUT - Posture Hash Type</param>
|
|
/// <returns>
|
|
/// Legal values:
|
|
/// PT_STATUS_SUCCESS : 0
|
|
/// PT_STATUS_INTERNAL_ERROR : 1
|
|
/// </returns>
|
|
public virtual uint GetEacOptions(out uint outEacVendors,out uint outPostureHashAlgorithm)
|
|
{
|
|
GetEacOptions_INPUT input = new GetEacOptions_INPUT(this.XmlNamespace);
|
|
GetEacOptions_OUTPUT output = new GetEacOptions_OUTPUT();
|
|
uint returnValue = base.Invoke("GetEacOptions",input,out output);
|
|
outEacVendors=0;
|
|
outPostureHashAlgorithm=0;
|
|
if (returnValue == 0)
|
|
{
|
|
if (output.ContainsField("EacVendors"))
|
|
outEacVendors = output.EacVendors;
|
|
if (output.ContainsField("PostureHashAlgorithm"))
|
|
outPostureHashAlgorithm = output.PostureHashAlgorithm;
|
|
}
|
|
return returnValue;
|
|
}
|
|
/// <summary>
|
|
///This method configures EAC options for the Intel(R) AMT device.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_EndpointAccessControlService", IsNullable=false)]
|
|
private class SetEacOptions_INPUT : CimParams
|
|
{
|
|
public SetEacOptions_INPUT(string ns) : base(ns)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Required, Enabled EAC Vendors
|
|
/// </summary>
|
|
[CimField(false,true)]
|
|
public virtual uint EacVendors
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("EacVendors",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Required, Posture Hash Method
|
|
/// </summary>
|
|
[CimField(false,true)]
|
|
public virtual uint PostureHashAlgorithm
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("PostureHashAlgorithm",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///This method configures EAC options for the Intel(R) AMT device.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_EndpointAccessControlService", IsNullable=false)]
|
|
private class SetEacOptions_OUTPUT : CimParams
|
|
{
|
|
public SetEacOptions_OUTPUT() : base("")
|
|
{
|
|
}
|
|
|
|
}
|
|
/// <summary>
|
|
///This method configures EAC options for the Intel(R) AMT device.
|
|
/// </summary>
|
|
/// <param name="inEacVendors">Required, IN -Enabled EAC Vendors</param>
|
|
/// <param name="inPostureHashAlgorithm">Required, IN -Posture Hash Method</param>
|
|
/// <returns>
|
|
/// Legal values:
|
|
/// PT_STATUS_SUCCESS : 0
|
|
/// PT_STATUS_INTERNAL_ERROR : 1
|
|
/// PT_STATUS_INVALID_PARAMETER : 36
|
|
/// PT_STATUS_FLASH_WRITE_LIMIT_EXCEEDED : 38
|
|
/// PT_STATUS_UNSUPPORTED : 2066
|
|
/// PT_STATUS_AUDIT_FAIL : 2075
|
|
/// </returns>
|
|
public virtual uint SetEacOptions(uint? inEacVendors,uint? inPostureHashAlgorithm)
|
|
{
|
|
SetEacOptions_INPUT input = new SetEacOptions_INPUT(this.XmlNamespace);
|
|
if (inEacVendors.HasValue)
|
|
input.EacVendors=inEacVendors.Value;
|
|
if (inPostureHashAlgorithm.HasValue)
|
|
input.PostureHashAlgorithm=inPostureHashAlgorithm.Value;
|
|
SetEacOptions_OUTPUT output = new SetEacOptions_OUTPUT();
|
|
uint returnValue = base.Invoke("SetEacOptions",input,out output);
|
|
return returnValue;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of AMT_EndpointAccessControlService 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_EndpointAccessControlService objects</returns>
|
|
public static new Collection<AMT_EndpointAccessControlService> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<AMT_EndpointAccessControlService> ret = CimBase.Enumerate<AMT_EndpointAccessControlService>(client, cimKeys);
|
|
return new Collection<AMT_EndpointAccessControlService>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of AMT_EndpointAccessControlService class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of AMT_EndpointAccessControlService objects</returns>
|
|
public static new Collection<AMT_EndpointAccessControlService> Enumerate(IWSManClient client)
|
|
{
|
|
List<AMT_EndpointAccessControlService> ret = CimBase.Enumerate<AMT_EndpointAccessControlService>(client);
|
|
return new Collection<AMT_EndpointAccessControlService>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of AMT_EndpointAccessControlService 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_EndpointAccessControlService>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the AMT_EndpointAccessControlService class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CIM_Service.CimKeys
|
|
{
|
|
}
|
|
|
|
}
|
|
}
|
|
|