//----------------------------------------------------------------------------
//
// 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
{
///
///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.
///
[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
{
///
/// Default constructor.
///
public CIM_PolicySetAppliesToElement() :base()
{
}
///
/// Constructor that recieves an xml string for deserialization.
///
/// xml string to deserialize
public CIM_PolicySetAppliesToElement(string xml): base((IWSManClient)null)
{
this.Deserialize(xml);
}
///
/// Constructor which recieves a Ws-Management client object.
///
/// Ws-Management client
public CIM_PolicySetAppliesToElement(IWSManClient client): base(client)
{
}
///
/// Key, Required, The ManagedElement to which the PolicySet applies.
///
[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));
}
}
///
/// Key, Required, The PolicyRules and/or groups of rules that are currently applied to an Element.
///
[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));
}
}
///
/// Enumerate instances of CIM_PolicySetAppliesToElement class at an endpoint.
///
/// WS-Management client
/// Keys for selecting the instances
/// Collection of CIM_PolicySetAppliesToElement objects
public static Collection Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
{
List ret = CimBase.Enumerate(client, cimKeys);
return new Collection(ret);
}
///
/// Enumerate instances of CIM_PolicySetAppliesToElement class at an endpoint.
///
/// WS-Management client
/// Collection of CIM_PolicySetAppliesToElement objects
public static Collection Enumerate(IWSManClient client)
{
List ret = CimBase.Enumerate(client);
return new Collection(ret);
}
///
/// Delete the instance of CIM_PolicySetAppliesToElement 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_PolicySetAppliesToElement class.
///
public new class CimKeys : CimBase.CimKeys
{
///
/// Key, Required, The ManagedElement to which the PolicySet applies.
///
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);
}
}
///
/// Key, Required, The PolicyRules and/or groups of rules that are currently applied to an Element.
///
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);
}
}
}
}
}