324 lines
15 KiB
C#

//----------------------------------------------------------------------------
//
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
//
// File: CIM_StatisticalData.cs
//
// Contents: CIM_StatisticalData is a root class for any arbitrary collection of statistical data and/or metrics applicable to one or more ManagedElements. These statistics MUST represent the most recent observations and MUST NOT be provided if irrelevant or stale. Note that this class uses a simplified naming/identity algorithm as compared to CIM_StatisticalInformation.
// This file was automatically generated from CIM_StatisticalData.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_StatisticalData is a root class for any arbitrary collection of statistical data and/or metrics applicable to one or more ManagedElements. These statistics MUST represent the most recent observations and MUST NOT be provided if irrelevant or stale. Note that this class uses a simplified naming/identity algorithm as compared to CIM_StatisticalInformation.
/// </summary>
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_StatisticalData")]
[System.Xml.Serialization.XmlRootAttribute("CIM_StatisticalData", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_StatisticalData", IsNullable=false)]
public class CIM_StatisticalData : CIM_ManagedElement
{
/// <summary>
/// Default constructor.
/// </summary>
public CIM_StatisticalData() :base()
{
}
/// <summary>
/// Constructor that recieves an xml string for deserialization.
/// </summary>
/// <param name="xml">xml string to deserialize</param>
public CIM_StatisticalData(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_StatisticalData(IWSManClient client): base(client)
{
}
/// <summary>
/// Required, The user friendly name for this instance of StatisticalData. In addition, the user friendly name can be used as a index property for a search of query. (Note: Name does not have to be unique within a namespace.)
/// </summary>
[CimField(false, true)]
public override string ElementName
{
get
{
return this.GetField("ElementName")[0];
}
set
{
this.SetOrAddField("ElementName",value);
}
}
/// <summary>
/// Key, Required, Within the scope of the instantiating Namespace, InstanceID opaquely and uniquely identifies an instance of this class. In order to ensure uniqueness within the NameSpace, the value of InstanceID SHOULD be constructed using the following 'preferred' algorithm:
/// &lt;OrgID&gt;:&lt;LocalID&gt;
/// Where &lt;OrgID&gt; and &lt;LocalID&gt; are separated by a colon ':', and where &lt;OrgID&gt; MUST include a copyrighted, trademarked or otherwise unique name that is owned by the business entity creating/defining the InstanceID, or is a registered ID that is assigned to the business entity by a recognized global authority (This is similar to the &lt;Schema Name&gt;_&lt;Class Name&gt; structure of Schema class names.) In addition, to ensure uniqueness &lt;OrgID&gt; MUST NOT contain a colon (':'). When using this algorithm, the first colon to appear in InstanceID MUST appear between &lt;OrgID&gt; and &lt;LocalID&gt;.
/// &lt;LocalID&gt; is chosen by the business entity and SHOULD not be re-used to identify different underlying (real-world) elements. If the above 'preferred' algorithm is not used, the defining entity MUST assure that the resultant InstanceID is not re-used across any InstanceIDs produced by this or other providers for this instance's NameSpace.
/// For DMTF defined instances, the 'preferred' algorithm MUST be used with the &lt;OrgID&gt; set to 'CIM'.
/// </summary>
[CimField(true, true)]
public override string InstanceID
{
get
{
return this.GetField("InstanceID")[0];
}
set
{
this.SetOrAddField("InstanceID",value);
}
}
/// <summary>
/// Remove SampleInterval field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveSampleInterval()
{
RemoveField("SampleInterval");
}
/// <summary>
/// Is true if the field SampleInterval exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool SampleIntervalExist
{
get
{
return ContainsField("SampleInterval");
}
}
/// <summary>
/// Optional, Some statistics are sampled at consistent time intervals. This property provides the sample interval so that client applications can determine the minimum time that new statistics should be pulled. If the statistics are not sampled at consistent time intervals, this property must be set to a zero time interval.
/// </summary>
[CimField(false, false)]
public virtual CimDateTime SampleInterval
{
get
{
return CimDateTime.Parse(this["SampleInterval"][0]);
}
set
{
this.SetOrAddField("SampleInterval",value.ToString());
}
}
/// <summary>
/// Remove StartStatisticTime field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveStartStatisticTime()
{
RemoveField("StartStatisticTime");
}
/// <summary>
/// Is true if the field StartStatisticTime exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool StartStatisticTimeExist
{
get
{
return ContainsField("StartStatisticTime");
}
}
/// <summary>
/// Optional, The time, relative to managed element where the statistic was collected, when the first measurement was taken. If the statistic is reset, the StartStatisticTime is the time when the reset was performed.
/// </summary>
[CimField(false, false)]
public virtual CimDateTime StartStatisticTime
{
get
{
return CimDateTime.Parse(this["StartStatisticTime"][0]);
}
set
{
this.SetOrAddField("StartStatisticTime",value.ToString());
}
}
/// <summary>
/// Remove StatisticTime field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveStatisticTime()
{
RemoveField("StatisticTime");
}
/// <summary>
/// Is true if the field StatisticTime exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool StatisticTimeExist
{
get
{
return ContainsField("StatisticTime");
}
}
/// <summary>
/// Optional, The time the most recent measurement was taken, relative to the managed element where the statistic was collected.
/// </summary>
[CimField(false, false)]
public virtual CimDateTime StatisticTime
{
get
{
return CimDateTime.Parse(this["StatisticTime"][0]);
}
set
{
this.SetOrAddField("StatisticTime",value.ToString());
}
}
/// <summary>
///Method to reset one or more of the instance's statistics. The method takes one parameter as input - an array of strings indicating which statistics to reset. If all the statistics in the instance should be reset, the first element of the array MUST be set to "All" or "ALL". If one or more individual statistics should be reset, the corresponding property names are entered into the elements of the array.
///The method returns 0 if successful, 1 if not supported, and any other value if an error occurred. A method is specified so that the StatisticalInformation's provider/ instrumentation, which calculates the statistics, can reset its internal processing, counters, etc.
///In a subclass, the set of possible return codes could be specified, using a ValueMap qualifier on the method. The strings to which the ValueMap contents are 'translated' may also be specified in the subclass as a Values array qualifier.
/// </summary>
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_StatisticalData", IsNullable=false)]
private class ResetSelectedStats_INPUT : CimParams
{
public ResetSelectedStats_INPUT(string ns) : base(ns)
{
}
/// <summary>
/// Optional, Array of strings indicating which statistics to reset.
/// </summary>
[CimField(false,false)]
public virtual string[] SelectedStatistics
{
set
{
this.SetOrAddField("SelectedStatistics",value);
}
}
}
/// <summary>
///Method to reset one or more of the instance's statistics. The method takes one parameter as input - an array of strings indicating which statistics to reset. If all the statistics in the instance should be reset, the first element of the array MUST be set to "All" or "ALL". If one or more individual statistics should be reset, the corresponding property names are entered into the elements of the array.
///The method returns 0 if successful, 1 if not supported, and any other value if an error occurred. A method is specified so that the StatisticalInformation's provider/ instrumentation, which calculates the statistics, can reset its internal processing, counters, etc.
///In a subclass, the set of possible return codes could be specified, using a ValueMap qualifier on the method. The strings to which the ValueMap contents are 'translated' may also be specified in the subclass as a Values array qualifier.
/// </summary>
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_StatisticalData", IsNullable=false)]
private class ResetSelectedStats_OUTPUT : CimParams
{
public ResetSelectedStats_OUTPUT() : base("")
{
}
}
/// <summary>
///Method to reset one or more of the instance's statistics. The method takes one parameter as input - an array of strings indicating which statistics to reset. If all the statistics in the instance should be reset, the first element of the array MUST be set to "All" or "ALL". If one or more individual statistics should be reset, the corresponding property names are entered into the elements of the array.
///The method returns 0 if successful, 1 if not supported, and any other value if an error occurred. A method is specified so that the StatisticalInformation's provider/ instrumentation, which calculates the statistics, can reset its internal processing, counters, etc.
///In a subclass, the set of possible return codes could be specified, using a ValueMap qualifier on the method. The strings to which the ValueMap contents are 'translated' may also be specified in the subclass as a Values array qualifier.
/// </summary>
/// <param name="inSelectedStatistics">Optional, IN -Array of strings indicating which statistics to reset.</param>
/// <returns>
/// </returns>
public virtual uint ResetSelectedStats(string[] inSelectedStatistics)
{
ResetSelectedStats_INPUT input = new ResetSelectedStats_INPUT(this.XmlNamespace);
if (inSelectedStatistics != null)
input.SelectedStatistics=inSelectedStatistics;
ResetSelectedStats_OUTPUT output = new ResetSelectedStats_OUTPUT();
uint returnValue = base.Invoke("ResetSelectedStats",input,out output);
return returnValue;
}
/// <summary>
/// Enumerate instances of CIM_StatisticalData 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_StatisticalData objects</returns>
public static new Collection<CIM_StatisticalData> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
{
List<CIM_StatisticalData> ret = CimBase.Enumerate<CIM_StatisticalData>(client, cimKeys);
return new Collection<CIM_StatisticalData>(ret);
}
/// <summary>
/// Enumerate instances of CIM_StatisticalData class at an endpoint.
/// </summary>
/// <param name="client">WS-Management client</param>
/// <returns>Collection of CIM_StatisticalData objects</returns>
public static new Collection<CIM_StatisticalData> Enumerate(IWSManClient client)
{
List<CIM_StatisticalData> ret = CimBase.Enumerate<CIM_StatisticalData>(client);
return new Collection<CIM_StatisticalData>(ret);
}
/// <summary>
/// Delete the instance of CIM_StatisticalData 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_StatisticalData>(client);
}
/// <summary>
/// Represents the keys of the CIM_StatisticalData class.
/// </summary>
public new class CimKeys : CIM_ManagedElement.CimKeys
{
/// <summary>
/// Key, Required, Within the scope of the instantiating Namespace, InstanceID opaquely and uniquely identifies an instance of this class. In order to ensure uniqueness within the NameSpace, the value of InstanceID SHOULD be constructed using the following 'preferred' algorithm:
/// &lt;OrgID&gt;:&lt;LocalID&gt;
/// Where &lt;OrgID&gt; and &lt;LocalID&gt; are separated by a colon ':', and where &lt;OrgID&gt; MUST include a copyrighted, trademarked or otherwise unique name that is owned by the business entity creating/defining the InstanceID, or is a registered ID that is assigned to the business entity by a recognized global authority (This is similar to the &lt;Schema Name&gt;_&lt;Class Name&gt; structure of Schema class names.) In addition, to ensure uniqueness &lt;OrgID&gt; MUST NOT contain a colon (':'). When using this algorithm, the first colon to appear in InstanceID MUST appear between &lt;OrgID&gt; and &lt;LocalID&gt;.
/// &lt;LocalID&gt; is chosen by the business entity and SHOULD not be re-used to identify different underlying (real-world) elements. If the above 'preferred' algorithm is not used, the defining entity MUST assure that the resultant InstanceID is not re-used across any InstanceIDs produced by this or other providers for this instance's NameSpace.
/// For DMTF defined instances, the 'preferred' algorithm MUST be used with the &lt;OrgID&gt; set to 'CIM'.
/// </summary>
public virtual string InstanceID
{
get
{
return GetKey("InstanceID");
}
set
{
SetOrAddKey("InstanceID", value);
}
}
}
}
}