//----------------------------------------------------------------------------
//
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
//
// File: CIM_CredentialContext.cs
//
// Contents: This relationship defines a context (e.g., a System or Service) of a Credential. One example is a shared secret/ password which is defined within the context of an application (or Service). Generally, there is one scoping element for a Credential, however the multiplicities of the association allow a Credential to be scoped by more than one element. If this association is not instantiated for a Credential, that Credential is assumed to be scoped to the Namespace.
// This association may also be used to indicate that a Credential is valid in some other environment. For instance associating the Credential to a RemoteServiceAccessPoint would indicate that the Credential is used to access the remote service.
// This file was automatically generated from CIM_CredentialContext.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 relationship defines a context (e.g., a System or Service) of a Credential. One example is a shared secret/ password which is defined within the context of an application (or Service). Generally, there is one scoping element for a Credential, however the multiplicities of the association allow a Credential to be scoped by more than one element. If this association is not instantiated for a Credential, that Credential is assumed to be scoped to the Namespace.
///This association may also be used to indicate that a Credential is valid in some other environment. For instance associating the Credential to a RemoteServiceAccessPoint would indicate that the Credential is used to access the remote service.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_CredentialContext")]
[System.Xml.Serialization.XmlRootAttribute("CIM_CredentialContext", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_CredentialContext", IsNullable=false)]
public class CIM_CredentialContext : CimBase
{
///
/// Default constructor.
///
public CIM_CredentialContext() :base()
{
}
///
/// Constructor that recieves an xml string for deserialization.
///
/// xml string to deserialize
public CIM_CredentialContext(string xml): base((IWSManClient)null)
{
this.Deserialize(xml);
}
///
/// Constructor which recieves a Ws-Management client object.
///
/// Ws-Management client
public CIM_CredentialContext(IWSManClient client): base(client)
{
}
///
/// Key, Required, A Credential whose context is defined.
///
[CimField(true, false)]
public virtual 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));
}
}
///
/// Key, Required, The ManagedElement that provides context or scope for the Credential.
///
[CimField(true, false)]
public virtual 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));
}
}
///
/// Remove Usage field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveUsage()
{
RemoveField("Usage");
}
///
/// Is true if the field Usage exists in the current object,
/// otherwise is false.
///
public virtual bool UsageExist
{
get
{
return ContainsField("Usage");
}
}
///
/// Optional, The usage of the certificate by the managed element that the certificate is for or is scoped to. Owned - Credential represents the CredentialContexts identity. This means that the managed element will present this credential to another party for authentication, authorization, or both. Trusted - The ManagedElement trusts the credential. This means that the credential is trusted for one or more of the security operations such as authentication, third-party authentication, and authorization. Trusted for Authentication - The ManagedElement trusts the identity represented by the credential only for authentication purposes. Trusted for Authorization - The ManagedElement trusts the identity represented by the credential only for authorization purposes. Trusted for Authentication/Authorization - The ManagedElement trusts the identity represented by the credential both for authentication and authorization purposes. Trusted for Third-Party Authentication/Authorization - The credential is being trusted for approving a third-party credential to the ManagedElement.
///
[CimField(false, false)]
public virtual ushort Usage
{
get
{
return ushort.Parse(this["Usage"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("Usage",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Enumerate instances of CIM_CredentialContext class at an endpoint.
///
/// WS-Management client
/// Keys for selecting the instances
/// Collection of CIM_CredentialContext objects
public static Collection Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
{
List ret = CimBase.Enumerate(client, cimKeys);
return new Collection(ret);
}
///
/// Enumerate instances of CIM_CredentialContext class at an endpoint.
///
/// WS-Management client
/// Collection of CIM_CredentialContext objects
public static Collection Enumerate(IWSManClient client)
{
List ret = CimBase.Enumerate(client);
return new Collection(ret);
}
///
/// Delete the instance of CIM_CredentialContext if it is singular.
/// Note: This method will succeed only if a single instance of the class exists.
///
/// WS-Management client
public static void Delete(IWSManClient client)
{
CimBase.Delete(client);
}
///
/// Represents the keys of the CIM_CredentialContext class.
///
public new class CimKeys : CimBase.CimKeys
{
///
/// Key, Required, A Credential whose context is defined.
///
public virtual CimReference ElementInContext
{
get
{
string innerXML = GetKey("ElementInContext");
CimReference epr = new CimReference("ElementInContext", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_CredentialContext", innerXML);
return epr;
}
set
{
SetOrAddKey("ElementInContext", value);
}
}
///
/// Key, Required, The ManagedElement that provides context or scope for the Credential.
///
public virtual CimReference ElementProvidingContext
{
get
{
string innerXML = GetKey("ElementProvidingContext");
CimReference epr = new CimReference("ElementProvidingContext", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_CredentialContext", innerXML);
return epr;
}
set
{
SetOrAddKey("ElementProvidingContext", value);
}
}
}
}
}