//---------------------------------------------------------------------------- // // Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved. // // File: CIM_Role.cs // // Contents: The Role object class is used to represent a position or set of responsibilities within an organization, organizational unit or other scope, and MAY be filled by a person or persons (or non-human entities represented by ManagedSystemElement subclasses) - i.e., the 'role occupants'. The latter MAY be explicitly associated to a Role, by associating Identities using MemberOfCollection. The 'position or set of responsibilities' of a Role are represented as a set of rights defined by instances of the Privilege class, and are also associated to the Role via MemberOfCollection. If Identities are not explicitly associated, instances of AuthorizationRule MUST be associated with a Role using AuthorizationRuleAppliesToRole. The rule defines how subject entities are authorized for a Role and to which target entities the Role applies. // // The Role class is defined so as to incorporate commonly-used LDAP attributes to permit implementations to easily derive this information from LDAP-accessible directories. This class's properties are a subset of a related class, OtherRoleInformation, which defines all the group properties and uses arrays for directory compatibility. // This file was automatically generated from CIM_Role.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 { /// ///The Role object class is used to represent a position or set of responsibilities within an organization, organizational unit or other scope, and MAY be filled by a person or persons (or non-human entities represented by ManagedSystemElement subclasses) - i.e., the 'role occupants'. The latter MAY be explicitly associated to a Role, by associating Identities using MemberOfCollection. The 'position or set of responsibilities' of a Role are represented as a set of rights defined by instances of the Privilege class, and are also associated to the Role via MemberOfCollection. If Identities are not explicitly associated, instances of AuthorizationRule MUST be associated with a Role using AuthorizationRuleAppliesToRole. The rule defines how subject entities are authorized for a Role and to which target entities the Role applies. ///The Role class is defined so as to incorporate commonly-used LDAP attributes to permit implementations to easily derive this information from LDAP-accessible directories. This class's properties are a subset of a related class, OtherRoleInformation, which defines all the group properties and uses arrays for directory compatibility. /// [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Role")] [System.Xml.Serialization.XmlRootAttribute("CIM_Role", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Role", IsNullable=false)] public class CIM_Role : CIM_Collection { /// /// Default constructor. /// public CIM_Role() :base() { } /// /// Constructor that recieves an xml string for deserialization. /// /// xml string to deserialize public CIM_Role(string xml): base((IWSManClient)null) { this.Deserialize(xml); } /// /// Constructor which recieves a Ws-Management client object. /// /// Ws-Management client public CIM_Role(IWSManClient client): base(client) { } /// /// Remove BusinessCategory field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveBusinessCategory() { RemoveField("BusinessCategory"); } /// /// Is true if the field BusinessCategory exists in the current object, /// otherwise is false. /// public virtual bool BusinessCategoryExist { get { return ContainsField("BusinessCategory"); } } /// /// Optional, This property may be used to describe the kind of business activity performed by the members (role occupants) in the position or set of responsibilities represented by the Role. /// [CimField(false, false)] public virtual string BusinessCategory { get { return this.GetField("BusinessCategory")[0]; } set { this.SetOrAddField("BusinessCategory",value); } } /// /// Required, A Common Name is a (possibly ambiguous) name by which the role is commonly known in some limited scope (such as an organization) and conforms to the naming conventions of the country or culture with which it is associated. /// [CimField(false, true)] public virtual string CommonName { get { return this.GetField("CommonName")[0]; } set { this.SetOrAddField("CommonName",value); } } /// /// Key, Required, CreationClassName indicates the name of the class or the subclass used in the creation of an instance. When used with the other key properties of this class, this property allows all instances of this class and its subclasses to be uniquely identified. /// [CimField(true, true)] public virtual string CreationClassName { get { return this.GetField("CreationClassName")[0]; } set { this.SetOrAddField("CreationClassName",value); } } /// /// Key, Required, The Name property defines the label by which the object is known. In the case of an LDAP-derived instance, the Name property value may be set to the distinguished name of the LDAP-accessed object instance. /// [CimField(true, true)] public virtual string Name { get { return this.GetField("Name")[0]; } set { this.SetOrAddField("Name",value); } } /// /// Remove RoleCharacteristics field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveRoleCharacteristics() { RemoveField("RoleCharacteristics"); } /// /// Is true if the field RoleCharacteristics exists in the current object, /// otherwise is false. /// public virtual bool RoleCharacteristicsExist { get { return ContainsField("RoleCharacteristics"); } } /// /// Optional, RoleCharacteristics provides descriptive information about the intended usage of the Role. /// When the value 2 "Static" is specified, no modification to the role shall be allowed. Any requests by client to change the privileges or the scope of the role by modifying the associated instances of CIM_Privilege or referencing associations shall fail. /// When the value 2 "Static" is not specified, the instance of CIM_Role may be modified by a client. The modification may include changing the scope of the role or rights granted. When the value 3 "Opaque" is specified, the rights granted by the CIM_Role instance shall not be explicitly modeled through aggregation of instances of CIM_Privilege. /// When the value 3 "Opaque" is not specified, the rights granted by the instance of CIM_Role shall be explicitly modeled through aggregation of instances of CIM_Privilege. /// [CimField(false, false)] public virtual ushort[] RoleCharacteristics { get { return CimTypesUtils.StringArrayToArray(this["RoleCharacteristics"]); } set { string[] arr = CimTypesUtils.ArrayToStringArray(value); this.SetOrAddField("RoleCharacteristics", arr); } } /// /// Enumerate instances of CIM_Role class at an endpoint. /// /// WS-Management client /// Keys for selecting the instances /// Collection of CIM_Role objects public static new Collection Enumerate(IWSManClient client, CimBase.CimKeys cimKeys) { List ret = CimBase.Enumerate(client, cimKeys); return new Collection(ret); } /// /// Enumerate instances of CIM_Role class at an endpoint. /// /// WS-Management client /// Collection of CIM_Role objects public static new Collection Enumerate(IWSManClient client) { List ret = CimBase.Enumerate(client); return new Collection(ret); } /// /// Delete the instance of CIM_Role if it is singular. /// Note: This method will succeed only if a single instance of the class exists. /// /// WS-Management client public static new void Delete(IWSManClient client) { CimBase.Delete(client); } /// /// Represents the keys of the CIM_Role class. /// public new class CimKeys : CIM_Collection.CimKeys { /// /// Key, Required, CreationClassName indicates the name of the class or the subclass used in the creation of an instance. When used with the other key properties of this class, this property allows all instances of this class and its subclasses to be uniquely identified. /// public virtual string CreationClassName { get { return GetKey("CreationClassName"); } set { SetOrAddKey("CreationClassName", value); } } /// /// Key, Required, The Name property defines the label by which the object is known. In the case of an LDAP-derived instance, the Name property value may be set to the distinguished name of the LDAP-accessed object instance. /// public virtual string Name { get { return GetKey("Name"); } set { SetOrAddKey("Name", value); } } } } }