209 lines
6.7 KiB
C#

//----------------------------------------------------------------------------
//
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
//
// File: CIM_PolicySetInSystem.cs
//
// Contents: PolicySetInSystem is an abstract association class that represents a relationship between a System and a PolicySet used in the administrative scope of that system (e.g., AdminDomain, ComputerSystem). The Priority property is used to assign a relative priority to a PolicySet within the administrative scope in contexts where it is not a component of another PolicySet.
// This file was automatically generated from CIM_PolicySetInSystem.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>
///PolicySetInSystem is an abstract association class that represents a relationship between a System and a PolicySet used in the administrative scope of that system (e.g., AdminDomain, ComputerSystem). The Priority property is used to assign a relative priority to a PolicySet within the administrative scope in contexts where it is not a component of another PolicySet.
/// </summary>
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PolicySetInSystem")]
[System.Xml.Serialization.XmlRootAttribute("CIM_PolicySetInSystem", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PolicySetInSystem", IsNullable=false)]
public class CIM_PolicySetInSystem : CIM_PolicyInSystem
{
/// <summary>
/// Default constructor.
/// </summary>
public CIM_PolicySetInSystem() :base()
{
}
/// <summary>
/// Constructor that recieves an xml string for deserialization.
/// </summary>
/// <param name="xml">xml string to deserialize</param>
public CIM_PolicySetInSystem(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_PolicySetInSystem(IWSManClient client): base(client)
{
}
/// <summary>
/// Required, The System in whose scope a PolicySet is defined.
/// </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, A PolicySet named within the scope of a System.
/// </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>
/// Remove Priority field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemovePriority()
{
RemoveField("Priority");
}
/// <summary>
/// Is true if the field Priority exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool PriorityExist
{
get
{
return ContainsField("Priority");
}
}
/// <summary>
/// Optional, The Priority property is used to specify the relative priority of the referenced PolicySet when there are more than one PolicySet instances applied to a managed resource that are not PolicySetComponents and, therefore, have no other relative priority defined. The priority is a non-negative integer; a larger value indicates a higher priority.
/// </summary>
[CimField(false, false)]
public virtual ushort Priority
{
get
{
return ushort.Parse(this["Priority"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("Priority",value.ToString(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Enumerate instances of CIM_PolicySetInSystem 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_PolicySetInSystem objects</returns>
public static new Collection<CIM_PolicySetInSystem> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
{
List<CIM_PolicySetInSystem> ret = CimBase.Enumerate<CIM_PolicySetInSystem>(client, cimKeys);
return new Collection<CIM_PolicySetInSystem>(ret);
}
/// <summary>
/// Enumerate instances of CIM_PolicySetInSystem class at an endpoint.
/// </summary>
/// <param name="client">WS-Management client</param>
/// <returns>Collection of CIM_PolicySetInSystem objects</returns>
public static new Collection<CIM_PolicySetInSystem> Enumerate(IWSManClient client)
{
List<CIM_PolicySetInSystem> ret = CimBase.Enumerate<CIM_PolicySetInSystem>(client);
return new Collection<CIM_PolicySetInSystem>(ret);
}
/// <summary>
/// Delete the instance of CIM_PolicySetInSystem 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_PolicySetInSystem>(client);
}
/// <summary>
/// Represents the keys of the CIM_PolicySetInSystem class.
/// </summary>
public new class CimKeys : CIM_PolicyInSystem.CimKeys
{
/// <summary>
/// Required, The System in whose scope a PolicySet is defined.
/// </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_PolicySetInSystem", innerXML);
return epr;
}
set
{
SetOrAddKey("Antecedent", value);
}
}
/// <summary>
/// Required, A PolicySet named within the scope of a System.
/// </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_PolicySetInSystem", innerXML);
return epr;
}
set
{
SetOrAddKey("Dependent", value);
}
}
}
}
}