312 lines
8.1 KiB
C#
312 lines
8.1 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: AMT_ProvisioningCertificateHash.cs
|
|
//
|
|
// Contents: A class derived from Credential that describes provisioning certificate hash entry.
|
|
// This file was automatically generated from AMT_ProvisioningCertificateHash.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 class derived from Credential that describes provisioning certificate hash entry.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_ProvisioningCertificateHash")]
|
|
[System.Xml.Serialization.XmlRootAttribute("AMT_ProvisioningCertificateHash", Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_ProvisioningCertificateHash", IsNullable=false)]
|
|
public class AMT_ProvisioningCertificateHash : CIM_Credential
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public AMT_ProvisioningCertificateHash() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public AMT_ProvisioningCertificateHash(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_ProvisioningCertificateHash(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Remove Description field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public override void RemoveDescription()
|
|
{
|
|
RemoveField("Description");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field Description exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public override bool DescriptionExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("Description");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, A friendly-name string.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public override string Description
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("Description")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Description",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove Enabled field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveEnabled()
|
|
{
|
|
RemoveField("Enabled");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field Enabled exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool EnabledExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("Enabled");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Indicates whether this certificate hash is in use
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual bool Enabled
|
|
{
|
|
get
|
|
{
|
|
return bool.Parse(this["Enabled"][0]);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Enabled",value.ToString().ToLower(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove HashData field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveHashData()
|
|
{
|
|
RemoveField("HashData");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field HashData exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool HashDataExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("HashData");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Hash value (length depending on hash type). This property is read-only.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual byte[] HashData
|
|
{
|
|
get
|
|
{
|
|
return Convert.FromBase64String(this.GetField("HashData")[0]); }
|
|
set
|
|
{
|
|
this.SetOrAddField("HashData",Convert.ToBase64String(value));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove HashType field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveHashType()
|
|
{
|
|
RemoveField("HashType");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field HashType exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool HashTypeExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("HashType");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The hash type.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual byte HashType
|
|
{
|
|
get
|
|
{
|
|
return byte.Parse(this["HashType"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("HashType",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, Within the scope of the instantiating Namespace, InstanceID opaquely and uniquely identifies an instance of this class.
|
|
/// </summary>
|
|
[CimField(true, true)]
|
|
public override string InstanceID
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("InstanceID")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("InstanceID",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove IsDefault field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveIsDefault()
|
|
{
|
|
RemoveField("IsDefault");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field IsDefault exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool IsDefaultExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("IsDefault");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Indicates whether this entry is a factory default. This property is read-only.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual bool IsDefault
|
|
{
|
|
get
|
|
{
|
|
return bool.Parse(this["IsDefault"][0]);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("IsDefault",value.ToString().ToLower(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of AMT_ProvisioningCertificateHash 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_ProvisioningCertificateHash objects</returns>
|
|
public static new Collection<AMT_ProvisioningCertificateHash> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<AMT_ProvisioningCertificateHash> ret = CimBase.Enumerate<AMT_ProvisioningCertificateHash>(client, cimKeys);
|
|
return new Collection<AMT_ProvisioningCertificateHash>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of AMT_ProvisioningCertificateHash class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of AMT_ProvisioningCertificateHash objects</returns>
|
|
public static new Collection<AMT_ProvisioningCertificateHash> Enumerate(IWSManClient client)
|
|
{
|
|
List<AMT_ProvisioningCertificateHash> ret = CimBase.Enumerate<AMT_ProvisioningCertificateHash>(client);
|
|
return new Collection<AMT_ProvisioningCertificateHash>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of AMT_ProvisioningCertificateHash 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_ProvisioningCertificateHash>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the AMT_ProvisioningCertificateHash class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CIM_Credential.CimKeys
|
|
{
|
|
/// <summary>
|
|
/// Key, Required, Within the scope of the instantiating Namespace, InstanceID opaquely and uniquely identifies an instance of this class.
|
|
/// </summary>
|
|
|
|
public virtual string InstanceID
|
|
{
|
|
get
|
|
{
|
|
return GetKey("InstanceID");
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("InstanceID", value);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|