176 lines
6.3 KiB
C#
176 lines
6.3 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: CIM_PolicyInSystem.cs
|
|
//
|
|
// Contents: CIM_PolicyInSystem is a generic association used to establish dependency relationships between Policies and the Systems that host them. These Systems may be ComputerSystems where Policies are 'running' or they may be Policy Repositories where Policies are stored. This relationship is similar to the concept of CIM_Services being dependent on CIM_Systems as defined by the HostedService association.
|
|
//
|
|
// Cardinality is Max (1) for the Antecedent/System reference since Policies can only be hosted in at most one System context. Some subclasses of the association will further refine this definition to make the Policies Weak to Systems. Other subclasses of PolicyInSystem will define an optional hosting relationship. Examples of each of these are the PolicyRuleInSystem and PolicyConditionIn PolicyRepository associations, respectively.
|
|
// This file was automatically generated from CIM_PolicyInSystem.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>
|
|
///CIM_PolicyInSystem is a generic association used to establish dependency relationships between Policies and the Systems that host them. These Systems may be ComputerSystems where Policies are 'running' or they may be Policy Repositories where Policies are stored. This relationship is similar to the concept of CIM_Services being dependent on CIM_Systems as defined by the HostedService association.
|
|
///Cardinality is Max (1) for the Antecedent/System reference since Policies can only be hosted in at most one System context. Some subclasses of the association will further refine this definition to make the Policies Weak to Systems. Other subclasses of PolicyInSystem will define an optional hosting relationship. Examples of each of these are the PolicyRuleInSystem and PolicyConditionIn PolicyRepository associations, respectively.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PolicyInSystem")]
|
|
[System.Xml.Serialization.XmlRootAttribute("CIM_PolicyInSystem", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PolicyInSystem", IsNullable=false)]
|
|
public class CIM_PolicyInSystem : CIM_HostedDependency
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public CIM_PolicyInSystem() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public CIM_PolicyInSystem(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_PolicyInSystem(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Required, The hosting System.
|
|
/// </summary>
|
|
[CimField(true, false)]
|
|
public override CimReference Antecedent
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("Antecedent")[0];
|
|
CimReference epr = new CimReference("Antecedent", XmlNamespace, innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Antecedent",value.Serialize(false));
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Required, The hosted Policy.
|
|
/// </summary>
|
|
[CimField(true, false)]
|
|
public override CimReference Dependent
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("Dependent")[0];
|
|
CimReference epr = new CimReference("Dependent", XmlNamespace, innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Dependent",value.Serialize(false));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_PolicyInSystem 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_PolicyInSystem objects</returns>
|
|
public static new Collection<CIM_PolicyInSystem> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<CIM_PolicyInSystem> ret = CimBase.Enumerate<CIM_PolicyInSystem>(client, cimKeys);
|
|
return new Collection<CIM_PolicyInSystem>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_PolicyInSystem class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of CIM_PolicyInSystem objects</returns>
|
|
public static new Collection<CIM_PolicyInSystem> Enumerate(IWSManClient client)
|
|
{
|
|
List<CIM_PolicyInSystem> ret = CimBase.Enumerate<CIM_PolicyInSystem>(client);
|
|
return new Collection<CIM_PolicyInSystem>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of CIM_PolicyInSystem 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<CIM_PolicyInSystem>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the CIM_PolicyInSystem class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CIM_HostedDependency.CimKeys
|
|
{
|
|
/// <summary>
|
|
/// Required, The hosting System.
|
|
/// </summary>
|
|
|
|
public virtual CimReference Antecedent
|
|
{
|
|
get
|
|
{
|
|
string innerXML = GetKey("Antecedent");
|
|
CimReference epr = new CimReference("Antecedent", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PolicyInSystem", innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("Antecedent", value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Required, The hosted Policy.
|
|
/// </summary>
|
|
|
|
public virtual CimReference Dependent
|
|
{
|
|
get
|
|
{
|
|
string innerXML = GetKey("Dependent");
|
|
CimReference epr = new CimReference("Dependent", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PolicyInSystem", innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("Dependent", value);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|