//---------------------------------------------------------------------------- // // 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 { /// ///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. /// [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 { /// /// Default constructor. /// public AMT_EndpointAccessControlService() :base() { } /// /// Constructor that recieves an xml string for deserialization. /// /// xml string to deserialize public AMT_EndpointAccessControlService(string xml): base((IWSManClient)null) { this.Deserialize(xml); } /// /// Constructor which recieves a Ws-Management client object. /// /// Ws-Management client public AMT_EndpointAccessControlService(IWSManClient client): base(client) { } /// ///This method returns (and optionally updates) the EAC posture for the Intel(R) AMT device. /// [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) { } /// /// Required, The posture type to be generated. /// [CimField(false,true)] public virtual ushort PostureType { set { this.SetOrAddField("PostureType",value.ToString(CultureInfo.InvariantCulture)); } } } /// ///This method returns (and optionally updates) the EAC posture for the Intel(R) AMT device. /// [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("") { } /// /// Optional, BLOB representation of a Signed NAC Posture data block. /// [CimField(false,false)] public virtual byte[] SignedPosture { get { return Convert.FromBase64String(this.GetField("SignedPosture")[0]); } } /// /// 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. /// [CimField(false,false)] public virtual byte[] PostureChangeHash { get { return Convert.FromBase64String(this.GetField("PostureChangeHash")[0]); } } } /// ///This method returns (and optionally updates) the EAC posture for the Intel(R) AMT device. /// /// Required, IN -The posture type to be generated. /// OUT - BLOB representation of a Signed NAC Posture data block. /// 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. /// /// Legal values: /// PT_STATUS_SUCCESS : 0 /// PT_STATUS_INTERNAL_ERROR : 1 /// PT_STATUS_INVALID_PARAMETER : 36 /// PT_STATUS_NO_ASSOCIATION : 2072 /// 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; } /// ///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. /// [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) { } /// /// Required, The posture type to be generated. /// [CimField(false,true)] public virtual ushort PostureType { set { this.SetOrAddField("PostureType",value.ToString(CultureInfo.InvariantCulture)); } } } /// ///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. /// [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("") { } /// /// 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. /// [CimField(false,false)] public virtual byte[] PostureChangeHash { get { return Convert.FromBase64String(this.GetField("PostureChangeHash")[0]); } } } /// ///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. /// /// Required, IN -The posture type to be generated. /// 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. /// /// Legal values: /// PT_STATUS_SUCCESS : 0 /// PT_STATUS_INTERNAL_ERROR : 1 /// PT_STATUS_INVALID_PARAMETER : 36 /// PT_STATUS_NO_ASSOCIATION : 2072 /// 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; } /// ///This command tells the Intel AMT device to reset its boot counters and Agent Presence state counters. /// [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) { } /// /// Required, The posture element to be updated. /// [CimField(false,true)] public virtual ushort UpdateType { set { this.SetOrAddField("UpdateType",value.ToString(CultureInfo.InvariantCulture)); } } } /// ///This command tells the Intel AMT device to reset its boot counters and Agent Presence state counters. /// [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("") { } } /// ///This command tells the Intel AMT device to reset its boot counters and Agent Presence state counters. /// /// Required, IN -The posture element to be updated. /// /// Legal values: /// PT_STATUS_SUCCESS : 0 /// PT_STATUS_INTERNAL_ERROR : 1 /// PT_STATUS_INVALID_PARAMETER : 36 /// PT_STATUS_AUDIT_FAIL : 2075 /// 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; } /// ///This method returns EAC options for the Intel(R) AMT device. /// [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) { } } /// ///This method returns EAC options for the Intel(R) AMT device. /// [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("") { } /// /// Optional, Enabled EAC Vendors /// [CimField(false,false)] public virtual uint EacVendors { get { return uint.Parse(this["EacVendors"][0], CultureInfo.InvariantCulture); } } /// /// Optional, Posture Hash Type /// [CimField(false,false)] public virtual uint PostureHashAlgorithm { get { return uint.Parse(this["PostureHashAlgorithm"][0], CultureInfo.InvariantCulture); } } } /// ///This method returns EAC options for the Intel(R) AMT device. /// /// OUT - Enabled EAC Vendors /// OUT - Posture Hash Type /// /// Legal values: /// PT_STATUS_SUCCESS : 0 /// PT_STATUS_INTERNAL_ERROR : 1 /// 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; } /// ///This method configures EAC options for the Intel(R) AMT device. /// [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) { } /// /// Required, Enabled EAC Vendors /// [CimField(false,true)] public virtual uint EacVendors { set { this.SetOrAddField("EacVendors",value.ToString(CultureInfo.InvariantCulture)); } } /// /// Required, Posture Hash Method /// [CimField(false,true)] public virtual uint PostureHashAlgorithm { set { this.SetOrAddField("PostureHashAlgorithm",value.ToString(CultureInfo.InvariantCulture)); } } } /// ///This method configures EAC options for the Intel(R) AMT device. /// [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("") { } } /// ///This method configures EAC options for the Intel(R) AMT device. /// /// Required, IN -Enabled EAC Vendors /// Required, IN -Posture Hash Method /// /// 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 /// 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; } /// /// Enumerate instances of AMT_EndpointAccessControlService class at an endpoint. /// /// WS-Management client /// Keys for selecting the instances /// Collection of AMT_EndpointAccessControlService 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_EndpointAccessControlService class at an endpoint. /// /// WS-Management client /// Collection of AMT_EndpointAccessControlService objects public static new Collection Enumerate(IWSManClient client) { List ret = CimBase.Enumerate(client); return new Collection(ret); } /// /// Delete the instance of AMT_EndpointAccessControlService 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_EndpointAccessControlService class. /// public new class CimKeys : CIM_Service.CimKeys { } } }