//----------------------------------------------------------------------------
//
// 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
{
///
///A class derived from Credential that describes provisioning certificate hash entry.
///
[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
{
///
/// Default constructor.
///
public AMT_ProvisioningCertificateHash() :base()
{
}
///
/// Constructor that recieves an xml string for deserialization.
///
/// xml string to deserialize
public AMT_ProvisioningCertificateHash(string xml): base((IWSManClient)null)
{
this.Deserialize(xml);
}
///
/// Constructor which recieves a Ws-Management client object.
///
/// Ws-Management client
public AMT_ProvisioningCertificateHash(IWSManClient client): base(client)
{
}
///
/// Remove Description field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public override void RemoveDescription()
{
RemoveField("Description");
}
///
/// Is true if the field Description exists in the current object,
/// otherwise is false.
///
public override bool DescriptionExist
{
get
{
return ContainsField("Description");
}
}
///
/// Optional, A friendly-name string.
///
[CimField(false, false)]
public override string Description
{
get
{
return this.GetField("Description")[0];
}
set
{
this.SetOrAddField("Description",value);
}
}
///
/// Remove Enabled field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveEnabled()
{
RemoveField("Enabled");
}
///
/// Is true if the field Enabled exists in the current object,
/// otherwise is false.
///
public virtual bool EnabledExist
{
get
{
return ContainsField("Enabled");
}
}
///
/// Optional, Indicates whether this certificate hash is in use
///
[CimField(false, false)]
public virtual bool Enabled
{
get
{
return bool.Parse(this["Enabled"][0]);
}
set
{
this.SetOrAddField("Enabled",value.ToString().ToLower(CultureInfo.InvariantCulture));
}
}
///
/// Remove HashData field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveHashData()
{
RemoveField("HashData");
}
///
/// Is true if the field HashData exists in the current object,
/// otherwise is false.
///
public virtual bool HashDataExist
{
get
{
return ContainsField("HashData");
}
}
///
/// Optional, Hash value (length depending on hash type). This property is read-only.
///
[CimField(false, false)]
public virtual byte[] HashData
{
get
{
return Convert.FromBase64String(this.GetField("HashData")[0]); }
set
{
this.SetOrAddField("HashData",Convert.ToBase64String(value));
}
}
///
/// Remove HashType field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveHashType()
{
RemoveField("HashType");
}
///
/// Is true if the field HashType exists in the current object,
/// otherwise is false.
///
public virtual bool HashTypeExist
{
get
{
return ContainsField("HashType");
}
}
///
/// Optional, The hash type.
///
[CimField(false, false)]
public virtual byte HashType
{
get
{
return byte.Parse(this["HashType"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("HashType",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// 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);
}
}
///
/// Remove IsDefault field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveIsDefault()
{
RemoveField("IsDefault");
}
///
/// Is true if the field IsDefault exists in the current object,
/// otherwise is false.
///
public virtual bool IsDefaultExist
{
get
{
return ContainsField("IsDefault");
}
}
///
/// Optional, Indicates whether this entry is a factory default. This property is read-only.
///
[CimField(false, false)]
public virtual bool IsDefault
{
get
{
return bool.Parse(this["IsDefault"][0]);
}
set
{
this.SetOrAddField("IsDefault",value.ToString().ToLower(CultureInfo.InvariantCulture));
}
}
///
/// Enumerate instances of AMT_ProvisioningCertificateHash class at an endpoint.
///
/// WS-Management client
/// Keys for selecting the instances
/// Collection of AMT_ProvisioningCertificateHash 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_ProvisioningCertificateHash class at an endpoint.
///
/// WS-Management client
/// Collection of AMT_ProvisioningCertificateHash objects
public static new Collection Enumerate(IWSManClient client)
{
List ret = CimBase.Enumerate(client);
return new Collection(ret);
}
///
/// Delete the instance of AMT_ProvisioningCertificateHash 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_ProvisioningCertificateHash 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);
}
}
}
}
}