173 lines
6.1 KiB
C#
173 lines
6.1 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: CIM_PolicySetAppliesToElement.cs
|
|
//
|
|
// Contents: PolicySetAppliesToElement makes explicit which PolicySets (i.e., policy rules and groups of rules) ARE CURRENTLY applied to a particular Element. This association indicates that the PolicySets that are appropriate for a ManagedElement (specified using the PolicyRoleCollection aggregation) have actually been deployed in the policy management infrastructure. Note that if the named Element refers to a Collection, then the PolicySet is assumed to be applied to all the members of the Collection.
|
|
// This file was automatically generated from CIM_PolicySetAppliesToElement.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>
|
|
///PolicySetAppliesToElement makes explicit which PolicySets (i.e., policy rules and groups of rules) ARE CURRENTLY applied to a particular Element. This association indicates that the PolicySets that are appropriate for a ManagedElement (specified using the PolicyRoleCollection aggregation) have actually been deployed in the policy management infrastructure. Note that if the named Element refers to a Collection, then the PolicySet is assumed to be applied to all the members of the Collection.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PolicySetAppliesToElement")]
|
|
[System.Xml.Serialization.XmlRootAttribute("CIM_PolicySetAppliesToElement", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PolicySetAppliesToElement", IsNullable=false)]
|
|
public class CIM_PolicySetAppliesToElement : CimBase
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public CIM_PolicySetAppliesToElement() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public CIM_PolicySetAppliesToElement(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 CIM_PolicySetAppliesToElement(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, The ManagedElement to which the PolicySet applies.
|
|
/// </summary>
|
|
[CimField(true, false)]
|
|
public virtual CimReference ManagedElement
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("ManagedElement")[0];
|
|
CimReference epr = new CimReference("ManagedElement", XmlNamespace, innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("ManagedElement",value.Serialize(false));
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, The PolicyRules and/or groups of rules that are currently applied to an Element.
|
|
/// </summary>
|
|
[CimField(true, false)]
|
|
public virtual CimReference PolicySet
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("PolicySet")[0];
|
|
CimReference epr = new CimReference("PolicySet", XmlNamespace, innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("PolicySet",value.Serialize(false));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_PolicySetAppliesToElement class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <param name="cimKeys">Keys for selecting the instances</param>
|
|
/// <returns>Collection of CIM_PolicySetAppliesToElement objects</returns>
|
|
public static Collection<CIM_PolicySetAppliesToElement> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<CIM_PolicySetAppliesToElement> ret = CimBase.Enumerate<CIM_PolicySetAppliesToElement>(client, cimKeys);
|
|
return new Collection<CIM_PolicySetAppliesToElement>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_PolicySetAppliesToElement class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of CIM_PolicySetAppliesToElement objects</returns>
|
|
public static Collection<CIM_PolicySetAppliesToElement> Enumerate(IWSManClient client)
|
|
{
|
|
List<CIM_PolicySetAppliesToElement> ret = CimBase.Enumerate<CIM_PolicySetAppliesToElement>(client);
|
|
return new Collection<CIM_PolicySetAppliesToElement>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of CIM_PolicySetAppliesToElement 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 void Delete(IWSManClient client)
|
|
{
|
|
CimBase.Delete<CIM_PolicySetAppliesToElement>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the CIM_PolicySetAppliesToElement class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CimBase.CimKeys
|
|
{
|
|
/// <summary>
|
|
/// Key, Required, The ManagedElement to which the PolicySet applies.
|
|
/// </summary>
|
|
|
|
public virtual CimReference ManagedElement
|
|
{
|
|
get
|
|
{
|
|
string innerXML = GetKey("ManagedElement");
|
|
CimReference epr = new CimReference("ManagedElement", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PolicySetAppliesToElement", innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("ManagedElement", value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Key, Required, The PolicyRules and/or groups of rules that are currently applied to an Element.
|
|
/// </summary>
|
|
|
|
public virtual CimReference PolicySet
|
|
{
|
|
get
|
|
{
|
|
string innerXML = GetKey("PolicySet");
|
|
CimReference epr = new CimReference("PolicySet", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PolicySetAppliesToElement", innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("PolicySet", value);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|