535 lines
35 KiB
C#

//----------------------------------------------------------------------------
//
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
//
// File: CIM_PrivilegeManagementService.cs
//
// Contents: The PrivilegeManagementService is responsible for creating, deleting, and associating AuthorizedPrivilege instances. References to 'subject' and 'target' define the entities that are associated with an AuthorizedPrivilege instance via the relationships, AuthorizedSubject and AuthorizedTarget, respectively. When created, an AuthorizedPrivilege instance is related to this (PrivilegeManagement)Service via the association, ConcreteDependency.
// This file was automatically generated from CIM_PrivilegeManagementService.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>
///The PrivilegeManagementService is responsible for creating, deleting, and associating AuthorizedPrivilege instances. References to 'subject' and 'target' define the entities that are associated with an AuthorizedPrivilege instance via the relationships, AuthorizedSubject and AuthorizedTarget, respectively. When created, an AuthorizedPrivilege instance is related to this (PrivilegeManagement)Service via the association, ConcreteDependency.
/// </summary>
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PrivilegeManagementService")]
[System.Xml.Serialization.XmlRootAttribute("CIM_PrivilegeManagementService", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PrivilegeManagementService", IsNullable=false)]
public class CIM_PrivilegeManagementService : CIM_AuthorizationService
{
/// <summary>
/// Default constructor.
/// </summary>
public CIM_PrivilegeManagementService() :base()
{
}
/// <summary>
/// Constructor that recieves an xml string for deserialization.
/// </summary>
/// <param name="xml">xml string to deserialize</param>
public CIM_PrivilegeManagementService(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_PrivilegeManagementService(IWSManClient client): base(client)
{
}
/// <summary>
///When this method is called, a provider updates the specified Subject's rights to the Target according to the parameters of this call. The rights are modeled via an AuthorizedPrivilege instance. If an AuthorizedPrivilege instance is created as a result of this call, it MUST be linked to the Subject and Target via the AuthorizedSubject and AuthorizedTarget associations, respectively. When created, the AuthorizedPrivilege instance is associated to this PrivilegeManagementService via ConcreteDependency. If the execution of this call results in no rights between the Subject and Target, then they MUST NOT be linked to a particular AuthorizedPrivilege instance via AuthorizedSubject and AuthorizedTarget respectively.
///Note that regardless of whether specified via parameter, or template, the Activities, ActivityQualifiers and QualifierFormats, are mutually indexed. Also note that Subject and Target references MUST be supplied.
///The successful completion of the method SHALL create any necessary AuthorizedSubject, AuthorizedTarget, AuthorizedPrivilege, HostedDependency, and ConcreteDependency instances.
/// </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_PrivilegeManagementService", IsNullable=false)]
private class AssignAccess_INPUT : CimParams
{
public AssignAccess_INPUT(string ns) : base(ns)
{
}
/// <summary>
/// Required, The Subject parameter is a reference to a ManagedElement instance. This parameter MUST be supplied.
/// </summary>
[CimField(false,false)]
public virtual CimReference Subject
{
set
{
this.SetOrAddField("Subject",value.Serialize(false));
}
}
/// <summary>
/// Optional, MUST be NULL unless Privilege is NULL on input. The PrivilegeGranted flag indicates whether the rights defined by the parameters in this call should be granted or denied to the named Subject/Target pair.
/// </summary>
[CimField(false,false)]
public virtual bool PrivilegeGranted
{
set
{
this.SetOrAddField("PrivilegeGranted",value.ToString().ToLower(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Optional, MUST be NULL unless the Privilege is NULL on input. This parameter specifies the activities to be granted or denied.
/// </summary>
[CimField(false,false)]
public virtual ushort[] Activities
{
set
{
List<string> newArr = new List<string>();
foreach (ushort val in value)
{
newArr.Add(val.ToString(CultureInfo.InvariantCulture));
}
this.SetOrAddField("Activities",newArr.ToArray());
}
}
/// <summary>
/// Optional, MUST be NULL unless Privilege is NULL on input. This parameter defines the activity qualifiers for the Activities to be granted or denied.
/// </summary>
[CimField(false,false)]
public virtual string[] ActivityQualifiers
{
set
{
this.SetOrAddField("ActivityQualifiers",value);
}
}
/// <summary>
/// Optional, MUST be NULL unless Privilege is NULL on input. This parameter defines the qualifier formats for the corresponding ActivityQualifiers.
/// </summary>
[CimField(false,false)]
public virtual ushort[] QualifierFormats
{
set
{
List<string> newArr = new List<string>();
foreach (ushort val in value)
{
newArr.Add(val.ToString(CultureInfo.InvariantCulture));
}
this.SetOrAddField("QualifierFormats",newArr.ToArray());
}
}
/// <summary>
/// Required, The Target parameter is a reference to an instance of ManagedElement. This parameter MUST be supplied.
/// </summary>
[CimField(false,false)]
public virtual CimReference Target
{
set
{
this.SetOrAddField("Target",value.Serialize(false));
}
}
/// <summary>
/// Optional, On input, this reference MUST be either NULL or refer to an instance of AuthorizedPrivilege that is used as a template. The rights granted by corresponding entries in the Activities, ActivityQualifiers and QualifierFormats array properties are applied incrementally and do not affect unnamed rights. If the property, PrivilegeGranted, is false, then the named rights are removed. If PrivilegeGranted is True, then the named rights are added. (Note that the RemoveAccess method SHOULD be used to completely remove all privileges between a subject and a target. On output, this property references an AuthorizedPrivilege instance that represents the resulting rights between the named Subject and the named Target. AuthorizedPrivilege instances used as a templates in this property SHOULD have a HostedDependency association to the PriviligeManagementService and SHOULD NOT have any AuthorizedTarget or AuthorizedSubject associations to it.
/// </summary>
[CimField(false,false)]
public virtual CimReference Privilege
{
set
{
this.SetOrAddField("Privilege",value.Serialize(false));
}
}
}
/// <summary>
///When this method is called, a provider updates the specified Subject's rights to the Target according to the parameters of this call. The rights are modeled via an AuthorizedPrivilege instance. If an AuthorizedPrivilege instance is created as a result of this call, it MUST be linked to the Subject and Target via the AuthorizedSubject and AuthorizedTarget associations, respectively. When created, the AuthorizedPrivilege instance is associated to this PrivilegeManagementService via ConcreteDependency. If the execution of this call results in no rights between the Subject and Target, then they MUST NOT be linked to a particular AuthorizedPrivilege instance via AuthorizedSubject and AuthorizedTarget respectively.
///Note that regardless of whether specified via parameter, or template, the Activities, ActivityQualifiers and QualifierFormats, are mutually indexed. Also note that Subject and Target references MUST be supplied.
///The successful completion of the method SHALL create any necessary AuthorizedSubject, AuthorizedTarget, AuthorizedPrivilege, HostedDependency, and ConcreteDependency instances.
/// </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_PrivilegeManagementService", IsNullable=false)]
private class AssignAccess_OUTPUT : CimParams
{
public AssignAccess_OUTPUT() : base("")
{
}
/// <summary>
/// Optional, On input, this reference MUST be either NULL or refer to an instance of AuthorizedPrivilege that is used as a template. The rights granted by corresponding entries in the Activities, ActivityQualifiers and QualifierFormats array properties are applied incrementally and do not affect unnamed rights. If the property, PrivilegeGranted, is false, then the named rights are removed. If PrivilegeGranted is True, then the named rights are added. (Note that the RemoveAccess method SHOULD be used to completely remove all privileges between a subject and a target. On output, this property references an AuthorizedPrivilege instance that represents the resulting rights between the named Subject and the named Target. AuthorizedPrivilege instances used as a templates in this property SHOULD have a HostedDependency association to the PriviligeManagementService and SHOULD NOT have any AuthorizedTarget or AuthorizedSubject associations to it.
/// </summary>
[CimField(false,false)]
public virtual CimReference Privilege
{
get
{
string innerXML = this.GetField("Privilege")[0];
CimReference epr = new CimReference("Privilege", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PrivilegeManagementService", innerXML);
return epr;
}
}
}
/// <summary>
///When this method is called, a provider updates the specified Subject's rights to the Target according to the parameters of this call. The rights are modeled via an AuthorizedPrivilege instance. If an AuthorizedPrivilege instance is created as a result of this call, it MUST be linked to the Subject and Target via the AuthorizedSubject and AuthorizedTarget associations, respectively. When created, the AuthorizedPrivilege instance is associated to this PrivilegeManagementService via ConcreteDependency. If the execution of this call results in no rights between the Subject and Target, then they MUST NOT be linked to a particular AuthorizedPrivilege instance via AuthorizedSubject and AuthorizedTarget respectively.
///Note that regardless of whether specified via parameter, or template, the Activities, ActivityQualifiers and QualifierFormats, are mutually indexed. Also note that Subject and Target references MUST be supplied.
///The successful completion of the method SHALL create any necessary AuthorizedSubject, AuthorizedTarget, AuthorizedPrivilege, HostedDependency, and ConcreteDependency instances.
/// </summary>
/// <param name="inSubject">Required, IN -The Subject parameter is a reference to a ManagedElement instance. This parameter MUST be supplied.</param>
/// <param name="inPrivilegeGranted">Optional, IN -MUST be NULL unless Privilege is NULL on input. The PrivilegeGranted flag indicates whether the rights defined by the parameters in this call should be granted or denied to the named Subject/Target pair.</param>
/// <param name="inActivities">Optional, IN -MUST be NULL unless the Privilege is NULL on input. This parameter specifies the activities to be granted or denied.</param>
/// <param name="inActivityQualifiers">Optional, IN -MUST be NULL unless Privilege is NULL on input. This parameter defines the activity qualifiers for the Activities to be granted or denied.</param>
/// <param name="inQualifierFormats">Optional, IN -MUST be NULL unless Privilege is NULL on input. This parameter defines the qualifier formats for the corresponding ActivityQualifiers.</param>
/// <param name="inTarget">Required, IN -The Target parameter is a reference to an instance of ManagedElement. This parameter MUST be supplied.</param>
/// <param name="inPrivilege">Optional, IN -On input, this reference MUST be either NULL or refer to an instance of AuthorizedPrivilege that is used as a template. The rights granted by corresponding entries in the Activities, ActivityQualifiers and QualifierFormats array properties are applied incrementally and do not affect unnamed rights. If the property, PrivilegeGranted, is false, then the named rights are removed. If PrivilegeGranted is True, then the named rights are added. (Note that the RemoveAccess method SHOULD be used to completely remove all privileges between a subject and a target. On output, this property references an AuthorizedPrivilege instance that represents the resulting rights between the named Subject and the named Target. AuthorizedPrivilege instances used as a templates in this property SHOULD have a HostedDependency association to the PriviligeManagementService and SHOULD NOT have any AuthorizedTarget or AuthorizedSubject associations to it.</param>
/// <param name="outPrivilege">OUT - On input, this reference MUST be either NULL or refer to an instance of AuthorizedPrivilege that is used as a template. The rights granted by corresponding entries in the Activities, ActivityQualifiers and QualifierFormats array properties are applied incrementally and do not affect unnamed rights. If the property, PrivilegeGranted, is false, then the named rights are removed. If PrivilegeGranted is True, then the named rights are added. (Note that the RemoveAccess method SHOULD be used to completely remove all privileges between a subject and a target. On output, this property references an AuthorizedPrivilege instance that represents the resulting rights between the named Subject and the named Target. AuthorizedPrivilege instances used as a templates in this property SHOULD have a HostedDependency association to the PriviligeManagementService and SHOULD NOT have any AuthorizedTarget or AuthorizedSubject associations to it.</param>
/// <returns>
/// Legal values:
/// Success : 0
/// Not Supported : 1
/// Unspecified Error : 2
/// Timeout : 3
/// Failed : 4
/// Invalid Parameter : 5
/// DMTF Reserved : 6..15999
/// Unsupported Subject : 16000
/// Unsupported Privilege : 16001
/// Unsupported Target : 16002
/// Authorization Error : 16003
/// NULL not supported : 16004
/// Method Reserved : 16005..31999
/// Vendor Specific : 32000..65535
/// </returns>
public virtual uint AssignAccess(CimReference inSubject,bool? inPrivilegeGranted,ushort[] inActivities,string[] inActivityQualifiers,ushort[] inQualifierFormats,CimReference inTarget,CimReference inPrivilege,out CimReference outPrivilege)
{
AssignAccess_INPUT input = new AssignAccess_INPUT(this.XmlNamespace);
if (inSubject != null)
input.Subject=inSubject;
if (inPrivilegeGranted.HasValue)
input.PrivilegeGranted=inPrivilegeGranted.Value;
if (inActivities != null)
input.Activities=inActivities;
if (inActivityQualifiers != null)
input.ActivityQualifiers=inActivityQualifiers;
if (inQualifierFormats != null)
input.QualifierFormats=inQualifierFormats;
if (inTarget != null)
input.Target=inTarget;
if (inPrivilege != null)
input.Privilege=inPrivilege;
AssignAccess_OUTPUT output = new AssignAccess_OUTPUT();
uint returnValue = base.Invoke("AssignAccess",input,out output);
outPrivilege=null;
if (returnValue == 0)
{
if (output.ContainsField("Privilege"))
outPrivilege = output.Privilege;
}
return returnValue;
}
/// <summary>
///This method revokes a specific AuthorizedPrivilege or all privileges for a particular target, subject, or subject/target pair. If an AuthorizedPrivilege instance is left with no AuthorizedTarget associations, it SHOULD be deleted. The successful completion of the method SHALL remove the directly or indirectly requested AuthorizedSubject, AuthorizedTarget and AuthorizedPrivilege instances.
/// </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_PrivilegeManagementService", IsNullable=false)]
private class RemoveAccess_INPUT : CimParams
{
public RemoveAccess_INPUT(string ns) : base(ns)
{
}
/// <summary>
/// Optional, The Subject parameter is a reference to a ManagedElement instance (associated via AuthorizedSubject) for which privileges are to be revoked.
/// </summary>
[CimField(false,false)]
public virtual CimReference Subject
{
set
{
this.SetOrAddField("Subject",value.Serialize(false));
}
}
/// <summary>
/// Optional, A reference to the AuthorizedPrivilege to be revoked.
/// </summary>
[CimField(false,false)]
public virtual CimReference Privilege
{
set
{
this.SetOrAddField("Privilege",value.Serialize(false));
}
}
/// <summary>
/// Optional, The Target parameter is a reference to a ManagedElement (associated via AuthorizedTarget) which will no longer be protected via the AuthorizedPrivilege.
/// </summary>
[CimField(false,false)]
public virtual CimReference Target
{
set
{
this.SetOrAddField("Target",value.Serialize(false));
}
}
}
/// <summary>
///This method revokes a specific AuthorizedPrivilege or all privileges for a particular target, subject, or subject/target pair. If an AuthorizedPrivilege instance is left with no AuthorizedTarget associations, it SHOULD be deleted. The successful completion of the method SHALL remove the directly or indirectly requested AuthorizedSubject, AuthorizedTarget and AuthorizedPrivilege instances.
/// </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_PrivilegeManagementService", IsNullable=false)]
private class RemoveAccess_OUTPUT : CimParams
{
public RemoveAccess_OUTPUT() : base("")
{
}
}
/// <summary>
///This method revokes a specific AuthorizedPrivilege or all privileges for a particular target, subject, or subject/target pair. If an AuthorizedPrivilege instance is left with no AuthorizedTarget associations, it SHOULD be deleted. The successful completion of the method SHALL remove the directly or indirectly requested AuthorizedSubject, AuthorizedTarget and AuthorizedPrivilege instances.
/// </summary>
/// <param name="inSubject">Optional, IN -The Subject parameter is a reference to a ManagedElement instance (associated via AuthorizedSubject) for which privileges are to be revoked.</param>
/// <param name="inPrivilege">Optional, IN -A reference to the AuthorizedPrivilege to be revoked.</param>
/// <param name="inTarget">Optional, IN -The Target parameter is a reference to a ManagedElement (associated via AuthorizedTarget) which will no longer be protected via the AuthorizedPrivilege.</param>
/// <returns>
/// Legal values:
/// Success : 0
/// Not Supported : 1
/// Unspecified Error : 2
/// Timeout : 3
/// Failed : 4
/// Invalid Parameter : 5
/// DMTF Reserved : 6..15999
/// Unsupported Privilege : 16000
/// Unsupported Target : 16001
/// Authorization Error : 16002
/// Null parameter not supported : 16003
/// Method Reserved : 16004..32767
/// Vendor Specific : 32768..65535
/// </returns>
public virtual uint RemoveAccess(CimReference inSubject,CimReference inPrivilege,CimReference inTarget)
{
RemoveAccess_INPUT input = new RemoveAccess_INPUT(this.XmlNamespace);
if (inSubject != null)
input.Subject=inSubject;
if (inPrivilege != null)
input.Privilege=inPrivilege;
if (inTarget != null)
input.Target=inTarget;
RemoveAccess_OUTPUT output = new RemoveAccess_OUTPUT();
uint returnValue = base.Invoke("RemoveAccess",input,out output);
return returnValue;
}
/// <summary>
///ShowAccess reports the Privileges (i.e., rights) granted to a particular Subject and/or Target pair. Either a Subject, a Target or both MUST be specified. In the case where only one is specified, the method will return all rights to all Targets for the specified Subject, or all rights for all subjects which apply to the specified Target.
///ShowAccess returns the cumulative rights granted between the OutSubjects and OutTargets at the same array index (filtered to return the information that the requestor is authorized to view). If a specific array entry is NULL, then there exist NO rights that the requestor is authorized to view between the Subject/Target pair.
///Note that the Privileges returned by this method MAY NOT correspond to what is actually instantiated in the model, and MAY be optimized for ease of reporting. Hence, the data is passed 'by value', as embedded objects. Also, note that multiple Privileges MAY be defined for a given Subject/Target pair.
///Other mechanisms MAY also be used to retrieve this information. CIM Operations' EnumerateInstances MAY be used to return all Privileges currently instantiated within a namespace. Also, if the AuthorizedPrivilege subclass is instantiated, the CIM Operation Associators MAY be used to navigate from the Privilege to AuthorizedSubjects and AuthorizedTargets. These CIM Operations will not generally provide the functionality or optimizations available with ShowAccess.
/// </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_PrivilegeManagementService", IsNullable=false)]
private class ShowAccess_INPUT : CimParams
{
public ShowAccess_INPUT(string ns) : base(ns)
{
}
/// <summary>
/// Optional, The Subject parameter references an instance of ManagedElement. The result of this operation is that the cumulative rights of the Subject to access or define authorization rights for the Target will be reported. If no Subject is specified, then a Target MUST be supplied and ALL Subjects that have rights to access or define authorizations for the Target will be reported. (It should be noted that the information reported MUST be filtered by the rights of the requestor to view that data.) If the Subject element is a Collection, then the operation will specifically report the Privileges for all elements associated to the Collection via MemberOfCollection. These elements will be reported individually in the returned OutSubjects array.
/// </summary>
[CimField(false,false)]
public virtual CimReference Subject
{
set
{
this.SetOrAddField("Subject",value.Serialize(false));
}
}
/// <summary>
/// Optional, The Target parameter references an instance of ManagedElement. The result of this operation is that the cumulative rights of the Subject to access or define authorization rights for the Target will be reported. If no Target is specified, then a Subject MUST be supplied and ALL Targets for which that the Subject has rights to access or define authorization will be reported. (It should be noted that the information reported MUST be filtered by the rights of the requestor to view that data.) If the Target element is a Collection, then the operation will be applied to all elements associated to the Collection via MemberOfCollection. These elements will be reported individually in the returned OutTargets array.
/// </summary>
[CimField(false,false)]
public virtual CimReference Target
{
set
{
this.SetOrAddField("Target",value.Serialize(false));
}
}
}
/// <summary>
///ShowAccess reports the Privileges (i.e., rights) granted to a particular Subject and/or Target pair. Either a Subject, a Target or both MUST be specified. In the case where only one is specified, the method will return all rights to all Targets for the specified Subject, or all rights for all subjects which apply to the specified Target.
///ShowAccess returns the cumulative rights granted between the OutSubjects and OutTargets at the same array index (filtered to return the information that the requestor is authorized to view). If a specific array entry is NULL, then there exist NO rights that the requestor is authorized to view between the Subject/Target pair.
///Note that the Privileges returned by this method MAY NOT correspond to what is actually instantiated in the model, and MAY be optimized for ease of reporting. Hence, the data is passed 'by value', as embedded objects. Also, note that multiple Privileges MAY be defined for a given Subject/Target pair.
///Other mechanisms MAY also be used to retrieve this information. CIM Operations' EnumerateInstances MAY be used to return all Privileges currently instantiated within a namespace. Also, if the AuthorizedPrivilege subclass is instantiated, the CIM Operation Associators MAY be used to navigate from the Privilege to AuthorizedSubjects and AuthorizedTargets. These CIM Operations will not generally provide the functionality or optimizations available with ShowAccess.
/// </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_PrivilegeManagementService", IsNullable=false)]
private class ShowAccess_OUTPUT : CimParams
{
public ShowAccess_OUTPUT() : base("")
{
}
/// <summary>
/// Optional, The array of Subject REFs corresponding to the individual Privileges and OutTargets arrays. The resulting OutSubjects, Privileges and OutTargets arrays define the cumulative rights granted between the Subject/Target at the corresponding index (filtered to return the information that the requestor is authorized to view).
/// </summary>
[CimField(false,false)]
public virtual CimReference[] OutSubjects
{
get
{
string[] strArray = this.GetField("OutSubjects");
CimReference[] eprArray = new CimReference[strArray.Length];
for (int i = 0; i < strArray.Length; i++)
{
string innerXML = strArray[i];
CimReference tmpEPR = new CimReference("OutSubjects", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PrivilegeManagementService", innerXML);
eprArray.SetValue(tmpEPR, i);
}
return eprArray;
}
}
/// <summary>
/// Optional, The array of Target REFs corresponding to the individual Privileges and OutSubjects arrays. The resulting OutSubjects, Privileges and OutTargets arrays define the cumulative rights granted between the Subject/Target at the corresponding index (filtered to return the information that the requestor is authorized to view).
/// </summary>
[CimField(false,false)]
public virtual CimReference[] OutTargets
{
get
{
string[] strArray = this.GetField("OutTargets");
CimReference[] eprArray = new CimReference[strArray.Length];
for (int i = 0; i < strArray.Length; i++)
{
string innerXML = strArray[i];
CimReference tmpEPR = new CimReference("OutTargets", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PrivilegeManagementService", innerXML);
eprArray.SetValue(tmpEPR, i);
}
return eprArray;
}
}
/// <summary>
/// Optional, The returned Privilege objects represent the cumulative rights granted between the OutSubjects and OutTargets at the same array index (filtered to return the information that the requestor is authorized to view). If a specific array entry is NULL, then there exist NO rights that the requestor is authorized to view between the Subject/Target pair.
/// </summary>
[CimField(false,false)]
public virtual string[] Privileges
{
get
{
return this["Privileges"];
}
}
}
/// <summary>
///ShowAccess reports the Privileges (i.e., rights) granted to a particular Subject and/or Target pair. Either a Subject, a Target or both MUST be specified. In the case where only one is specified, the method will return all rights to all Targets for the specified Subject, or all rights for all subjects which apply to the specified Target.
///ShowAccess returns the cumulative rights granted between the OutSubjects and OutTargets at the same array index (filtered to return the information that the requestor is authorized to view). If a specific array entry is NULL, then there exist NO rights that the requestor is authorized to view between the Subject/Target pair.
///Note that the Privileges returned by this method MAY NOT correspond to what is actually instantiated in the model, and MAY be optimized for ease of reporting. Hence, the data is passed 'by value', as embedded objects. Also, note that multiple Privileges MAY be defined for a given Subject/Target pair.
///Other mechanisms MAY also be used to retrieve this information. CIM Operations' EnumerateInstances MAY be used to return all Privileges currently instantiated within a namespace. Also, if the AuthorizedPrivilege subclass is instantiated, the CIM Operation Associators MAY be used to navigate from the Privilege to AuthorizedSubjects and AuthorizedTargets. These CIM Operations will not generally provide the functionality or optimizations available with ShowAccess.
/// </summary>
/// <param name="inSubject">Optional, IN -The Subject parameter references an instance of ManagedElement. The result of this operation is that the cumulative rights of the Subject to access or define authorization rights for the Target will be reported. If no Subject is specified, then a Target MUST be supplied and ALL Subjects that have rights to access or define authorizations for the Target will be reported. (It should be noted that the information reported MUST be filtered by the rights of the requestor to view that data.) If the Subject element is a Collection, then the operation will specifically report the Privileges for all elements associated to the Collection via MemberOfCollection. These elements will be reported individually in the returned OutSubjects array.</param>
/// <param name="inTarget">Optional, IN -The Target parameter references an instance of ManagedElement. The result of this operation is that the cumulative rights of the Subject to access or define authorization rights for the Target will be reported. If no Target is specified, then a Subject MUST be supplied and ALL Targets for which that the Subject has rights to access or define authorization will be reported. (It should be noted that the information reported MUST be filtered by the rights of the requestor to view that data.) If the Target element is a Collection, then the operation will be applied to all elements associated to the Collection via MemberOfCollection. These elements will be reported individually in the returned OutTargets array.</param>
/// <param name="outOutSubjects">OUT - The array of Subject REFs corresponding to the individual Privileges and OutTargets arrays. The resulting OutSubjects, Privileges and OutTargets arrays define the cumulative rights granted between the Subject/Target at the corresponding index (filtered to return the information that the requestor is authorized to view).</param>
/// <param name="outOutTargets">OUT - The array of Target REFs corresponding to the individual Privileges and OutSubjects arrays. The resulting OutSubjects, Privileges and OutTargets arrays define the cumulative rights granted between the Subject/Target at the corresponding index (filtered to return the information that the requestor is authorized to view).</param>
/// <param name="outPrivileges">OUT - The returned Privilege objects represent the cumulative rights granted between the OutSubjects and OutTargets at the same array index (filtered to return the information that the requestor is authorized to view). If a specific array entry is NULL, then there exist NO rights that the requestor is authorized to view between the Subject/Target pair.</param>
/// <returns>
/// Legal values:
/// Success : 0
/// Not Supported : 1
/// Unknown : 2
/// Timeout : 3
/// Failed : 4
/// Invalid Parameter : 5
/// DMTF Reserved : ..
/// Unsupported Subject : 16000
/// Unsupported Target : 16002
/// Authorization Error : 16003
/// NULL not supported : 16004
/// Method Reserved : 16005..31999
/// Vendor Specific : 32000..65535
/// </returns>
public virtual uint ShowAccess(CimReference inSubject,CimReference inTarget,out CimReference[] outOutSubjects,out CimReference[] outOutTargets,out string[] outPrivileges)
{
ShowAccess_INPUT input = new ShowAccess_INPUT(this.XmlNamespace);
if (inSubject != null)
input.Subject=inSubject;
if (inTarget != null)
input.Target=inTarget;
ShowAccess_OUTPUT output = new ShowAccess_OUTPUT();
uint returnValue = base.Invoke("ShowAccess",input,out output);
outOutSubjects=null;
outOutTargets=null;
outPrivileges=null;
if (returnValue == 0)
{
if (output.ContainsField("OutSubjects"))
outOutSubjects = output.OutSubjects;
if (output.ContainsField("OutTargets"))
outOutTargets = output.OutTargets;
if (output.ContainsField("Privileges"))
outPrivileges = output.Privileges;
}
return returnValue;
}
/// <summary>
/// Enumerate instances of CIM_PrivilegeManagementService 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_PrivilegeManagementService objects</returns>
public static new Collection<CIM_PrivilegeManagementService> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
{
List<CIM_PrivilegeManagementService> ret = CimBase.Enumerate<CIM_PrivilegeManagementService>(client, cimKeys);
return new Collection<CIM_PrivilegeManagementService>(ret);
}
/// <summary>
/// Enumerate instances of CIM_PrivilegeManagementService class at an endpoint.
/// </summary>
/// <param name="client">WS-Management client</param>
/// <returns>Collection of CIM_PrivilegeManagementService objects</returns>
public static new Collection<CIM_PrivilegeManagementService> Enumerate(IWSManClient client)
{
List<CIM_PrivilegeManagementService> ret = CimBase.Enumerate<CIM_PrivilegeManagementService>(client);
return new Collection<CIM_PrivilegeManagementService>(ret);
}
/// <summary>
/// Delete the instance of CIM_PrivilegeManagementService 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_PrivilegeManagementService>(client);
}
/// <summary>
/// Represents the keys of the CIM_PrivilegeManagementService class.
/// </summary>
public new class CimKeys : CIM_AuthorizationService.CimKeys
{
}
}
}