173 lines
5.3 KiB
C#
173 lines
5.3 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: AMT_TLSCredentialContext.cs
|
|
//
|
|
// Contents: This relationship defines a service context of a TLS Credential.
|
|
// This file was automatically generated from AMT_TLSCredentialContext.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>
|
|
///This relationship defines a service context of a TLS Credential.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_TLSCredentialContext")]
|
|
[System.Xml.Serialization.XmlRootAttribute("AMT_TLSCredentialContext", Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_TLSCredentialContext", IsNullable=false)]
|
|
public class AMT_TLSCredentialContext : CIM_CredentialContext
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public AMT_TLSCredentialContext() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public AMT_TLSCredentialContext(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_TLSCredentialContext(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, A certificate whose context is defined.
|
|
/// </summary>
|
|
[CimField(true, false)]
|
|
public override CimReference ElementInContext
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("ElementInContext")[0];
|
|
CimReference epr = new CimReference("ElementInContext", XmlNamespace, innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("ElementInContext",value.Serialize(false));
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, The TLSProtocolEndpointCollection that provides context or scope for the Credential.
|
|
/// </summary>
|
|
[CimField(true, false)]
|
|
public override CimReference ElementProvidingContext
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("ElementProvidingContext")[0];
|
|
CimReference epr = new CimReference("ElementProvidingContext", XmlNamespace, innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("ElementProvidingContext",value.Serialize(false));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of AMT_TLSCredentialContext 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_TLSCredentialContext objects</returns>
|
|
public static new Collection<AMT_TLSCredentialContext> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<AMT_TLSCredentialContext> ret = CimBase.Enumerate<AMT_TLSCredentialContext>(client, cimKeys);
|
|
return new Collection<AMT_TLSCredentialContext>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of AMT_TLSCredentialContext class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of AMT_TLSCredentialContext objects</returns>
|
|
public static new Collection<AMT_TLSCredentialContext> Enumerate(IWSManClient client)
|
|
{
|
|
List<AMT_TLSCredentialContext> ret = CimBase.Enumerate<AMT_TLSCredentialContext>(client);
|
|
return new Collection<AMT_TLSCredentialContext>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of AMT_TLSCredentialContext 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_TLSCredentialContext>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the AMT_TLSCredentialContext class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CIM_CredentialContext.CimKeys
|
|
{
|
|
/// <summary>
|
|
/// Key, Required, A certificate whose context is defined.
|
|
/// </summary>
|
|
|
|
public virtual CimReference ElementInContext
|
|
{
|
|
get
|
|
{
|
|
string innerXML = GetKey("ElementInContext");
|
|
CimReference epr = new CimReference("ElementInContext", "http://intel.com/wbem/wscim/1/amt-schema/1/AMT_TLSCredentialContext", innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("ElementInContext", value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Key, Required, The TLSProtocolEndpointCollection that provides context or scope for the Credential.
|
|
/// </summary>
|
|
|
|
public virtual CimReference ElementProvidingContext
|
|
{
|
|
get
|
|
{
|
|
string innerXML = GetKey("ElementProvidingContext");
|
|
CimReference epr = new CimReference("ElementProvidingContext", "http://intel.com/wbem/wscim/1/amt-schema/1/AMT_TLSCredentialContext", innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("ElementProvidingContext", value);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|