//---------------------------------------------------------------------------- // // Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved. // // File: CIM_Indication.cs // // Contents: CIM_Indication is the abstract root class for all notifications about changes in schema, objects and their data, and about events detected by providers and instrumentation. Subclasses represent specific types of notifications. // // To receive an Indication, a consumer (or subscriber) must create an instance of CIM_IndicationFilter describing the criteria of the notification, an instance of CIM_ListenerDestination describing the delivery of the notification, and an instance of CIM_IndicationSubscription associating the Filter and Handler. // This file was automatically generated from CIM_Indication.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 { /// ///CIM_Indication is the abstract root class for all notifications about changes in schema, objects and their data, and about events detected by providers and instrumentation. Subclasses represent specific types of notifications. ///To receive an Indication, a consumer (or subscriber) must create an instance of CIM_IndicationFilter describing the criteria of the notification, an instance of CIM_ListenerDestination describing the delivery of the notification, and an instance of CIM_IndicationSubscription associating the Filter and Handler. /// [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Indication")] [System.Xml.Serialization.XmlRootAttribute("CIM_Indication", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Indication", IsNullable=false)] public class CIM_Indication : CimBase { /// /// Default constructor. /// public CIM_Indication() :base() { } /// /// Constructor that recieves an xml string for deserialization. /// /// xml string to deserialize public CIM_Indication(string xml): base((IWSManClient)null) { this.Deserialize(xml); } /// /// Constructor which recieves a Ws-Management client object. /// /// Ws-Management client public CIM_Indication(IWSManClient client): base(client) { } /// /// Remove CorrelatedIndications field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveCorrelatedIndications() { RemoveField("CorrelatedIndications"); } /// /// Is true if the field CorrelatedIndications exists in the current object, /// otherwise is false. /// public virtual bool CorrelatedIndicationsExist { get { return ContainsField("CorrelatedIndications"); } } /// /// Optional, A list of IndicationIdentifiers whose notifications are correlated with (related to) this one. /// [CimField(false, false)] public virtual string[] CorrelatedIndications { get { return CimTypesUtils.StringArrayToArray(this["CorrelatedIndications"]); } set { string[] arr = CimTypesUtils.ArrayToStringArray(value); this.SetOrAddField("CorrelatedIndications", arr); } } /// /// Remove IndicationFilterName field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveIndicationFilterName() { RemoveField("IndicationFilterName"); } /// /// Is true if the field IndicationFilterName exists in the current object, /// otherwise is false. /// public virtual bool IndicationFilterNameExist { get { return ContainsField("IndicationFilterName"); } } /// /// Optional, An identifier for the indication filter that selects this indication and causes it to be sent. This property is to be filled out by the indication sending service. The value shall be correlatable with the Name property of the instance of CIM_IndicationFilter describing the criteria of the indication. The value of the IndicationFilterName should be formatted using the following algorithm: < OrgID > : < LocalID >, where < OrgID > and < LocalID > are separated by a colon (:) and < OrgID > shall include a copyrighted, trademarked, or otherwise unique name that is owned by the business entity that is creating or defining the value or that is a registered ID assigned to the business entity by a recognized global authority. In addition, to ensure uniqueness, < OrgID > shall not contain a colon (:).When using this algorithm, the first colon to appear in the value shall appear between < OrgID > and < LocalID >. < LocalID > is chosen by the business entity and shall be used uniquely. /// [CimField(false, false)] public virtual string IndicationFilterName { get { return this.GetField("IndicationFilterName")[0]; } set { this.SetOrAddField("IndicationFilterName",value); } } /// /// Remove IndicationIdentifier field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveIndicationIdentifier() { RemoveField("IndicationIdentifier"); } /// /// Is true if the field IndicationIdentifier exists in the current object, /// otherwise is false. /// public virtual bool IndicationIdentifierExist { get { return ContainsField("IndicationIdentifier"); } } /// /// Optional, An identifier for the Indication. This property is similar to a key value in that it can be used for identification, when correlating Indications (see the CorrelatedIndications array). Its value SHOULD be unique as long as correlations are reported, but MAY be reused or left NULL if no future Indications will reference it in their CorrelatedIndications array.To ensure uniqueness, the value of IndicationIdentifier should be constructed using the following "preferred" algorithm: /// <OrgID>:<LocalID> /// Where <OrgID> and <LocalID> are separated by a colon (:), and where <OrgID> must include a copyrighted, trademarked, or otherwise unique name that is owned by the business entity that is creating or defining the IndicationIdentifier or that is a recognized ID that is assigned to the business entity by a recognized global authority. (This requirement is similar to the <Schema Name>_<Class Name> structure of Schema class names.) In addition, to ensure uniqueness <OrgID> must not contain a colon (:). When using this algorithm, the first colon to appear in IndicationIdentifier must appear between <OrgID> and <LocalID>. /// <LocalID> 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 should assure that the resulting IndicationIdentifier is not re-used across any IndicationIdentifiers that are produced by this or other providers for the NameSpace of this instance. /// For DMTF-defined instances, the "preferred" algorithm should be used with the <OrgID> set to CIM. /// [CimField(false, false)] public virtual string IndicationIdentifier { get { return this.GetField("IndicationIdentifier")[0]; } set { this.SetOrAddField("IndicationIdentifier",value); } } /// /// Remove IndicationTime field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveIndicationTime() { RemoveField("IndicationTime"); } /// /// Is true if the field IndicationTime exists in the current object, /// otherwise is false. /// public virtual bool IndicationTimeExist { get { return ContainsField("IndicationTime"); } } /// /// Optional, The time and date of creation of the Indication. The property may be set to NULL if the entity creating the Indication is not capable of determining this information. Note that IndicationTime may be the same for two Indications that are generated in rapid succession. /// [CimField(false, false)] public virtual CimDateTime IndicationTime { get { return CimDateTime.Parse(this["IndicationTime"][0]); } set { this.SetOrAddField("IndicationTime",value.ToString()); } } /// /// Remove OtherSeverity field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveOtherSeverity() { RemoveField("OtherSeverity"); } /// /// Is true if the field OtherSeverity exists in the current object, /// otherwise is false. /// public virtual bool OtherSeverityExist { get { return ContainsField("OtherSeverity"); } } /// /// Optional, Holds the value of the user defined severity value when 'PerceivedSeverity' is 1 ("Other"). /// [CimField(false, false)] public virtual string OtherSeverity { get { return this.GetField("OtherSeverity")[0]; } set { this.SetOrAddField("OtherSeverity",value); } } /// /// Remove PerceivedSeverity field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemovePerceivedSeverity() { RemoveField("PerceivedSeverity"); } /// /// Is true if the field PerceivedSeverity exists in the current object, /// otherwise is false. /// public virtual bool PerceivedSeverityExist { get { return ContainsField("PerceivedSeverity"); } } /// /// Optional, An enumerated value that describes the severity of the Indication from the notifier's point of view: /// 1 - Other, by CIM convention, is used to indicate that the Severity's value can be found in the OtherSeverity property. /// 3 - Degraded/Warning should be used when its appropriate to let the user decide if action is needed. /// 4 - Minor should be used to indicate action is needed, but the situation is not serious at this time. /// 5 - Major should be used to indicate action is needed NOW. /// 6 - Critical should be used to indicate action is needed NOW and the scope is broad (perhaps an imminent outage to a critical resource will result). /// 7 - Fatal/NonRecoverable should be used to indicate an error occurred, but it's too late to take remedial action. /// 2 and 0 - Information and Unknown (respectively) follow common usage. Literally, the Indication is purely informational or its severity is simply unknown. /// [CimField(false, false)] public virtual ushort PerceivedSeverity { get { return ushort.Parse(this["PerceivedSeverity"][0], CultureInfo.InvariantCulture); } set { this.SetOrAddField("PerceivedSeverity",value.ToString(CultureInfo.InvariantCulture)); } } /// /// Remove SequenceContext field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveSequenceContext() { RemoveField("SequenceContext"); } /// /// Is true if the field SequenceContext exists in the current object, /// otherwise is false. /// public virtual bool SequenceContextExist { get { return ContainsField("SequenceContext"); } } /// /// Optional, The sequence context portion of a sequence identifier for the indication. The sequence number portion of the sequence identifier is provided by the SequenceNumber property. The combination of both property values represents the sequence identifier for the indication. /// The sequence identifier for the indication enables a CIM listener to identify duplicate indications when the CIM service attempts the delivery retry of indications, to reorder indications that arrive out-of-order, and to detect lost indications. /// If a CIM service does not support sequence identifiers for indications, this property shall be NULL. /// If a CIM service supports sequence identifiers for indications, this property shall be maintained by the CIM service for each registered listener destination, and its value shall uniquely identify the CIM service and the indication service within the CIM service such that restarts of the CIM service and deregistration of listener destinations to the CIM service cause the value to change, without reusing earlier values for a sufficiently long time. /// When retrying the delivery of an indication, this property shall have the same value as in the original delivery. /// To guarantee this uniqueness, the property value should be constructed using the following format (defined in ABNF): sequence-context = indication-service-name "#" cim-service-start-id "#" listener-destination-creation-time /// Where: indication-service-name is the value of the Name property of the CIM_IndicationService instance responsible for delivering the indication. cim-service-start-id is an identifier that uniquely identifies the CIM service start, for example via a timestamp of the start time, or via a counter that increases for each start or restart. listener-destination-creation-time is a timestamp of the creation time of the CIM_ListenerDestination instance representing the listener destination. /// Since this format is only a recommendation, CIM clients shall treat the value as an opaque identifier for the sequence context and shall not rely on this format. /// [CimField(false, false)] public virtual string SequenceContext { get { return this.GetField("SequenceContext")[0]; } set { this.SetOrAddField("SequenceContext",value); } } /// /// Remove SequenceNumber field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveSequenceNumber() { RemoveField("SequenceNumber"); } /// /// Is true if the field SequenceNumber exists in the current object, /// otherwise is false. /// public virtual bool SequenceNumberExist { get { return ContainsField("SequenceNumber"); } } /// /// Optional, The sequence number portion of a sequence identifier for the indication. The sequence context portion of the sequence identifier is provided by the SequenceContext property. The combination of both property values represents the sequence identifier for the indication. /// The sequence identifier for the indication enables a CIM listener to identify duplicate indications when the CIM service attempts the delivery retry of indications, to reorder indications that arrive out-of-order, and to detect lost indications. /// If a CIM service does not support sequence identifiers for indications, this property shall be NULL. /// If a CIM service supports sequence identifiers for indications, this property shall be maintained by the CIM service for each registered listener destination, and its value shall uniquely identify the indication within the sequence context provided by SequenceContext. It shall start at 0 whenever the sequence context string changes. Otherwise, it shall be increased by 1 for every new indication to that listener destination, and it shall wrap to 0 when the value range is exceeded. /// When retrying the delivery of an indication, this property shall have the same value as in the original delivery. /// [CimField(false, false)] public virtual long SequenceNumber { get { return long.Parse(this["SequenceNumber"][0], CultureInfo.InvariantCulture); } set { this.SetOrAddField("SequenceNumber",value.ToString(CultureInfo.InvariantCulture)); } } /// /// Enumerate instances of CIM_Indication class at an endpoint. /// /// WS-Management client /// Keys for selecting the instances /// Collection of CIM_Indication objects public static Collection Enumerate(IWSManClient client, CimBase.CimKeys cimKeys) { List ret = CimBase.Enumerate(client, cimKeys); return new Collection(ret); } /// /// Enumerate instances of CIM_Indication class at an endpoint. /// /// WS-Management client /// Collection of CIM_Indication objects public static Collection Enumerate(IWSManClient client) { List ret = CimBase.Enumerate(client); return new Collection(ret); } /// /// Delete the instance of CIM_Indication 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_Indication class. /// public new class CimKeys : CimBase.CimKeys { } } }