//---------------------------------------------------------------------------- // // Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved. // // File: CIM_AccountManagementService.cs // // Contents: CIM_AccountManagementService creates, manages, and if necessary destroys Accounts on behalf of other SecuritySerices. // This file was automatically generated from CIM_AccountManagementService.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_AccountManagementService creates, manages, and if necessary destroys Accounts on behalf of other SecuritySerices. /// [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_AccountManagementService")] [System.Xml.Serialization.XmlRootAttribute("CIM_AccountManagementService", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_AccountManagementService", IsNullable=false)] public class CIM_AccountManagementService : CIM_SecurityService { /// /// Default constructor. /// public CIM_AccountManagementService() :base() { } /// /// Constructor that recieves an xml string for deserialization. /// /// xml string to deserialize public CIM_AccountManagementService(string xml): base((IWSManClient)null) { this.Deserialize(xml); } /// /// Constructor which recieves a Ws-Management client object. /// /// Ws-Management client public CIM_AccountManagementService(IWSManClient client): base(client) { } /// ///CreateAccount creates an Account on the specified ComputerSystem. Upon successful completion of the method, there shall be a newly created instance of CIM_Account associated through the CIM_AccountOnSystem association with the instance of ComputerSystem identified by the System parameter such that each property of the CIM_Account instance has the value of the corresponding property of the template instance specified by the AccountTemplate parameter and the CIM_Account instance is associated with this instance of CIM_AccountManagementService through the CIM_ServiceAffectsElement association. ///Instances of CIM_Identity may be created by the method and associated with the instance of CIM_Account through CIM_AssignedIdentity. If one or more instances of CIM_Identity are created, a reference to each shall be returned in the Identities parameter, otherwise the Identities parameter shall be NULL upon method completion. /// [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] [System.Xml.Serialization.XmlRootAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_AccountManagementService", IsNullable=false)] private class CreateAccount_INPUT : CimParams { public CreateAccount_INPUT(string ns) : base(ns) { } /// /// Required, The scoping ComputerSystem in which to create the Account. /// [CimField(false,false)] public virtual CimReference System { set { this.SetOrAddField("System",value.Serialize(false)); } } /// /// Required, AccountTemplate is a template for the desired Account to be created. /// [CimField(false,true)] public virtual CIM_Account AccountTemplate { set { this.SetOrAddField("AccountTemplate",value.SerializeInner()); } } } /// ///CreateAccount creates an Account on the specified ComputerSystem. Upon successful completion of the method, there shall be a newly created instance of CIM_Account associated through the CIM_AccountOnSystem association with the instance of ComputerSystem identified by the System parameter such that each property of the CIM_Account instance has the value of the corresponding property of the template instance specified by the AccountTemplate parameter and the CIM_Account instance is associated with this instance of CIM_AccountManagementService through the CIM_ServiceAffectsElement association. ///Instances of CIM_Identity may be created by the method and associated with the instance of CIM_Account through CIM_AssignedIdentity. If one or more instances of CIM_Identity are created, a reference to each shall be returned in the Identities parameter, otherwise the Identities parameter shall be NULL upon method completion. /// [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] [System.Xml.Serialization.XmlRootAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_AccountManagementService", IsNullable=false)] private class CreateAccount_OUTPUT : CimParams { public CreateAccount_OUTPUT() : base("") { } /// /// Optional, Reference to the instance of CIM_Account created when the method returns a value of 0. /// [CimField(false,false)] public virtual CimReference Account { get { string innerXML = this.GetField("Account")[0]; CimReference epr = new CimReference("Account", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_AccountManagementService", innerXML); return epr; } } /// /// Optional, Reference to the instances of CIM_Identity created when the method returns a value of 0. NULL if no such instances are created. /// [CimField(false,false)] public virtual CimReference[] Identities { get { string[] strArray = this.GetField("Identities"); CimReference[] eprArray = new CimReference[strArray.Length]; for (int i = 0; i < strArray.Length; i++) { string innerXML = strArray[i]; CimReference tmpEPR = new CimReference("Identities", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_AccountManagementService", innerXML); eprArray.SetValue(tmpEPR, i); } return eprArray; } } } /// ///CreateAccount creates an Account on the specified ComputerSystem. Upon successful completion of the method, there shall be a newly created instance of CIM_Account associated through the CIM_AccountOnSystem association with the instance of ComputerSystem identified by the System parameter such that each property of the CIM_Account instance has the value of the corresponding property of the template instance specified by the AccountTemplate parameter and the CIM_Account instance is associated with this instance of CIM_AccountManagementService through the CIM_ServiceAffectsElement association. ///Instances of CIM_Identity may be created by the method and associated with the instance of CIM_Account through CIM_AssignedIdentity. If one or more instances of CIM_Identity are created, a reference to each shall be returned in the Identities parameter, otherwise the Identities parameter shall be NULL upon method completion. /// /// Required, IN -The scoping ComputerSystem in which to create the Account. /// Required, IN -AccountTemplate is a template for the desired Account to be created. /// OUT - Reference to the instance of CIM_Account created when the method returns a value of 0. /// OUT - Reference to the instances of CIM_Identity created when the method returns a value of 0. NULL if no such instances are created. /// /// Legal values: /// Completed with No Error : 0 /// Not Supported : 1 /// Failed : 2 /// Method Reserved : .. /// Vendor Specific : 32768..65535 /// public virtual uint CreateAccount(CimReference inSystem,CIM_Account inAccountTemplate,out CimReference outAccount,out CimReference[] outIdentities) { CreateAccount_INPUT input = new CreateAccount_INPUT(this.XmlNamespace); if (inSystem != null) input.System=inSystem; if (inAccountTemplate != null) input.AccountTemplate=inAccountTemplate; CreateAccount_OUTPUT output = new CreateAccount_OUTPUT(); uint returnValue = base.Invoke("CreateAccount",input,out output); outAccount=null; outIdentities=null; if (returnValue == 0) { if (output.ContainsField("Account")) outAccount = output.Account; if (output.ContainsField("Identities")) outIdentities = output.Identities; } return returnValue; } /// /// Enumerate instances of CIM_AccountManagementService class at an endpoint. /// /// WS-Management client /// Keys for selecting the instances /// Collection of CIM_AccountManagementService 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_AccountManagementService class at an endpoint. /// /// WS-Management client /// Collection of CIM_AccountManagementService objects public static new Collection Enumerate(IWSManClient client) { List ret = CimBase.Enumerate(client); return new Collection(ret); } /// /// Delete the instance of CIM_AccountManagementService 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_AccountManagementService class. /// public new class CimKeys : CIM_SecurityService.CimKeys { } } }