//---------------------------------------------------------------------------- // // Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved. // // File: AMT_PublicPrivateKeyPair.cs // // Contents: This class represents a public-private key in the Intel(R) AMT CertStore. // This file was automatically generated from AMT_PublicPrivateKeyPair.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 { /// ///This class represents a public-private key in the Intel(R) AMT CertStore. /// [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicPrivateKeyPair")] [System.Xml.Serialization.XmlRootAttribute("AMT_PublicPrivateKeyPair", Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicPrivateKeyPair", IsNullable=false)] public class AMT_PublicPrivateKeyPair : CIM_Credential { /// /// Default constructor. /// public AMT_PublicPrivateKeyPair() :base() { } /// /// Constructor that recieves an xml string for deserialization. /// /// xml string to deserialize public AMT_PublicPrivateKeyPair(string xml): base((IWSManClient)null) { this.Deserialize(xml); } /// /// Constructor which recieves a Ws-Management client object. /// /// Ws-Management client public AMT_PublicPrivateKeyPair(IWSManClient client): base(client) { } /// /// Remove DERKey field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveDERKey() { RemoveField("DERKey"); } /// /// Is true if the field DERKey exists in the current object, /// otherwise is false. /// public virtual bool DERKeyExist { get { return ContainsField("DERKey"); } } /// /// Optional, RSA Key encoded as DES PKCS#1. The Exponent (E) is 65537 (0x010001).When this structure is used as an output parameter (GET or PULL method),only the public section of the key is exported. /// [CimField(false, false)] public virtual byte[] DERKey { get { return Convert.FromBase64String(this.GetField("DERKey")[0]); } set { this.SetOrAddField("DERKey",Convert.ToBase64String(value)); } } /// /// Key, Required, Within the scope of the instantiating Namespace, InstanceID 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); } } /// /// Enumerate instances of AMT_PublicPrivateKeyPair class at an endpoint. /// /// WS-Management client /// Keys for selecting the instances /// Collection of AMT_PublicPrivateKeyPair 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_PublicPrivateKeyPair class at an endpoint. /// /// WS-Management client /// Collection of AMT_PublicPrivateKeyPair objects public static new Collection Enumerate(IWSManClient client) { List ret = CimBase.Enumerate(client); return new Collection(ret); } /// /// Delete the instance of AMT_PublicPrivateKeyPair 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_PublicPrivateKeyPair class. /// public new class CimKeys : CIM_Credential.CimKeys { /// /// Key, Required, Within the scope of the instantiating Namespace, InstanceID opaquely and uniquely identifies an instance of this class. /// public virtual string InstanceID { get { return GetKey("InstanceID"); } set { SetOrAddKey("InstanceID", value); } } } } }