EnumerationValue
Represents a class type definition in the management pack.
Warning
This element applies to Management Pack Schema 2.0 only.
Schema Hierarchy
ManagementPack
TypeDefinitions
EntityTypes
EnumerationTypes
EnumerationValue
Syntax
<EnumerationValue ID=”EnumerationID.Value” Comment=”string” Accessibility=”Internal/Public” Parent=”EnumerationTypeID” Ordinal=”double”>…</EnumerationValue>
Attributes and Elements
The following sections describe attributes, child elements, and the parent element for the EnumerationValue element.
Attributes
Attribute | Description |
---|---|
ID |
Required attribute. Represents the identity of the enumeration value. |
Comment |
Optional attribute. Represents commentary by the management pack author. |
Accessibility |
Required attribute. Defines the visibility of the enumeration value. |
Parent |
Optional attribute. Represents the enumeration value that defines the enumeration set. |
Ordinal |
Optional attribute. Represents the ordinal position of the value. |
Accessibility Attribute Values
Value | Description |
---|---|
Public |
Indicates that this enumeration value is visible to external management packs. |
Internal |
Indicates that external management packs cannot reference this enumeration value. |
Child Elements
None.
Parent Elements
Element | Description |
---|---|
EnumerationTypes |
Contains definitions of enumeration types used to restrict the value of a class type property. |
Remarks
An enumeration value is either a member of an enumeration set or the definition of a set. If the enumeration value is the definition of a set, the element will not define a Parent attribute. The ID of an enumeration value that defines a set should meaningfully reflect the class type of the property or properties that implement the enumeration type. For example, if your enumeration is set of values that represent two machine states (Online, Offline) for a Microsoft.Windows.Computer class type, the ID could be something like “WindowsComputer”. To define some enumeration values that belong to the “WindowsComputer” set, you would first define two enumeration values and you might name them in the following way: WindowsComputer.Online, WindowsComputer.Offline
. Then you define the Parent attribute on each on as “WindowsComputer”.
Enumeration values are also used to define Category values. For more information, see Category.
Example
The following XML sample shows how to define enumeration type sets and members of sets within a management pack. It also shows how to define a class type property that uses the defined enumeration data type sets.
<EnumerationTypes>
<EnumerationValue ID="Microsoft.SystemCenter.OperationsManager.Extensibility.DirectionEnum" Accessibility="Public"/>
<EnumerationValue ID="Microsoft.SystemCenter.OperationsManager.Extensibility.DirectionEnum.In" Accessibility="Public" Parent="Microsoft.SystemCenter.OperationsManager.Extensibility.DirectionEnum"/>
<EnumerationValue ID="Microsoft.SystemCenter.OperationsManager.Extensibility.DirectionEnum.Out" Accessibility="Public" Parent="Microsoft.SystemCenter.OperationsManager.Extensibility.DirectionEnum"/>
<EnumerationValue ID="Microsoft.SystemCenter.OperationsManager.Extensibility.DirectionEnum.Both" Accessibility="Public" Parent="Microsoft.SystemCenter.OperationsManager.Extensibility.DirectionEnum"/>
<EnumerationValue ID="Microsoft.SystemCenter.OperationsManager.Extensibility.LifetimeEnum" Accessibility="Public"/>
<EnumerationValue ID="Microsoft.SystemCenter.OperationsManager.Extensibility.LifetimeEnum.ReferenceCount" Accessibility="Public" Parent="Microsoft.SystemCenter.OperationsManager.Extensibility.LifetimeEnum"/>
<EnumerationValue ID="Microsoft.SystemCenter.OperationsManager.Extensibility.LifetimeEnum.ManagementPackElement" Accessibility="Public" Parent="Microsoft.SystemCenter.OperationsManager.Extensibility.LifetimeEnum"/>
</EnumerationTypes>
<ClassType ID="Microsoft.SystemCenter.OperationsManager.Extensibility.ComponentTypeProperty" Accessibility="Public" Abstract="false" Base="System!System.Extension">
<Property ID="Name" Type="string"/>
<Property ID="Type" Type="string"/>
<Property ID="BindingDirection" Type="enum" EnumType="Microsoft.SystemCenter.OperationsManager.Extensibility.DirectionEnum"/>
</ClassType>