//----------------------------------------------------------------------------
//
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
//
// File: CIM_ServiceAffectsElement.cs
//
// Contents: ServiceAffectsElement represents an association between a Service and the ManagedElements that might be affected by its execution. Instantiating this association indicates that running the service may change, manage, provide functionality for,or pose some burden on the ManagedElement. This burden might affect performance, throughput, availability, and so on.
// This file was automatically generated from CIM_ServiceAffectsElement.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
{
///
///ServiceAffectsElement represents an association between a Service and the ManagedElements that might be affected by its execution. Instantiating this association indicates that running the service may change, manage, provide functionality for,or pose some burden on the ManagedElement. This burden might affect performance, throughput, availability, and so on.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ServiceAffectsElement")]
[System.Xml.Serialization.XmlRootAttribute("CIM_ServiceAffectsElement", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ServiceAffectsElement", IsNullable=false)]
public class CIM_ServiceAffectsElement : CimBase
{
///
/// Default constructor.
///
public CIM_ServiceAffectsElement() :base()
{
}
///
/// Constructor that recieves an xml string for deserialization.
///
/// xml string to deserialize
public CIM_ServiceAffectsElement(string xml): base((IWSManClient)null)
{
this.Deserialize(xml);
}
///
/// Constructor which recieves a Ws-Management client object.
///
/// Ws-Management client
public CIM_ServiceAffectsElement(IWSManClient client): base(client)
{
}
///
/// Key, Required, The Managed Element that is affected by the Service.
///
[CimField(true, false)]
public virtual CimReference AffectedElement
{
get
{
string innerXML = this.GetField("AffectedElement")[0];
CimReference epr = new CimReference("AffectedElement", XmlNamespace, innerXML);
return epr;
}
set
{
this.SetOrAddField("AffectedElement",value.Serialize(false));
}
}
///
/// Key, Required, The Service that is affecting the ManagedElement.
///
[CimField(true, false)]
public virtual CimReference AffectingElement
{
get
{
string innerXML = this.GetField("AffectingElement")[0];
CimReference epr = new CimReference("AffectingElement", XmlNamespace, innerXML);
return epr;
}
set
{
this.SetOrAddField("AffectingElement",value.Serialize(false));
}
}
///
/// Remove ElementEffects field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveElementEffects()
{
RemoveField("ElementEffects");
}
///
/// Is true if the field ElementEffects exists in the current object,
/// otherwise is false.
///
public virtual bool ElementEffectsExist
{
get
{
return ContainsField("ElementEffects");
}
}
///
/// Optional, An enumeration that describes the effect on the ManagedElement. This array corresponds to the OtherElementEffectsDescriptions array, where the latter provides details that are related to the high-level effects enumerated by this property. Additional detail is required if the ElementEffects array contains the value 1 (Other). The values are defined as follows:
/// - Exclusive Use (2): No other Service may have this association to the element.
/// - Performance Impact (3): Deprecated in favor of "Consumes", "Enhances Performance", or "Degrades Performance". Execution of the Service may enhance or degrade the performance of the element. This may be as a side-effect of execution or as an intended consequence of methods provided by the Service.
/// - Element Integrity (4): Deprecated in favor of "Consumes", "Enhances Integrity", or "Degrades Integrity". Execution of the Service may enhance or degrade the integrity of the element. This may be as a side-effect of execution or as an intended consequence of methods provided by the Service.
/// - Manages (5): The Service manages the element.
/// - Consumes (6): Execution of the Service consumes some or all of the associated element as a consequence of running the Service. For example, the Service may consume CPU cycles, which may affect performance, or Storage which may affect both performance and integrity. (For instance, the lack of free storage can degrade integrity by reducing the ability to save state. ) "Consumes" may be used alone or in conjunction with other values, in particular, "Degrades Performance" and "Degrades Integrity".
/// "Manages" and not "Consumes" should be used to reflect allocation services that may be provided by a Service.
/// - Enhances Integrity (7): The Service may enhance integrity of the associated element.
/// - Degrades Integrity (8): The Service may degrade integrity of the associated element.
/// - Enhances Performance (9): The Service may enhance performance of the associated element.
/// - Degrades Performance (10): The Service may degrade performance of the associated element.
///
[CimField(false, false)]
public virtual ushort[] ElementEffects
{
get
{
return CimTypesUtils.StringArrayToArray(this["ElementEffects"]);
}
set
{
string[] arr = CimTypesUtils.ArrayToStringArray(value);
this.SetOrAddField("ElementEffects", arr);
}
}
///
/// Remove OtherElementEffectsDescriptions field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveOtherElementEffectsDescriptions()
{
RemoveField("OtherElementEffectsDescriptions");
}
///
/// Is true if the field OtherElementEffectsDescriptions exists in the current object,
/// otherwise is false.
///
public virtual bool OtherElementEffectsDescriptionsExist
{
get
{
return ContainsField("OtherElementEffectsDescriptions");
}
}
///
/// Optional, Provides details for the effect at the corresponding array position in ElementEffects. This information is required if ElementEffects contains the value 1 (Other).
///
[CimField(false, false)]
public virtual string[] OtherElementEffectsDescriptions
{
get
{
return CimTypesUtils.StringArrayToArray(this["OtherElementEffectsDescriptions"]);
}
set
{
string[] arr = CimTypesUtils.ArrayToStringArray(value);
this.SetOrAddField("OtherElementEffectsDescriptions", arr);
}
}
///
/// Enumerate instances of CIM_ServiceAffectsElement class at an endpoint.
///
/// WS-Management client
/// Keys for selecting the instances
/// Collection of CIM_ServiceAffectsElement objects
public static Collection Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
{
List ret = CimBase.Enumerate(client, cimKeys);
return new Collection(ret);
}
///
/// Enumerate instances of CIM_ServiceAffectsElement class at an endpoint.
///
/// WS-Management client
/// Collection of CIM_ServiceAffectsElement objects
public static Collection Enumerate(IWSManClient client)
{
List ret = CimBase.Enumerate(client);
return new Collection(ret);
}
///
/// Delete the instance of CIM_ServiceAffectsElement 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_ServiceAffectsElement class.
///
public new class CimKeys : CimBase.CimKeys
{
///
/// Key, Required, The Managed Element that is affected by the Service.
///
public virtual CimReference AffectedElement
{
get
{
string innerXML = GetKey("AffectedElement");
CimReference epr = new CimReference("AffectedElement", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ServiceAffectsElement", innerXML);
return epr;
}
set
{
SetOrAddKey("AffectedElement", value);
}
}
///
/// Key, Required, The Service that is affecting the ManagedElement.
///
public virtual CimReference AffectingElement
{
get
{
string innerXML = GetKey("AffectingElement");
CimReference epr = new CimReference("AffectingElement", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ServiceAffectsElement", innerXML);
return epr;
}
set
{
SetOrAddKey("AffectingElement", value);
}
}
}
}
}