//---------------------------------------------------------------------------- // // Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved. // // File: CIM_ServiceServiceDependency.cs // // Contents: CIM_ServiceServiceDependency is an association between a Service and another Service, which indicates that the latter cooperates with the former, is required to be present, required to have completed, or must be absent for the former Service to provide its functionality. For example, Boot Services might be dependent upon underlying system initialization Services. In the case of the initialization Services, the Boot Service might be dependent on the completion of the init Services. // When examining the ServiceServiceDependency class definition, note that its superclass ProvidesServiceToElement is deprecated. Unfortunately, ProvidesServiceToElement cannot be removed from the object hierarchy without a major Schema release. When or if a major release occurs, the ProvidesServiceToElement superclass will be removed, and ServiceServiceDependency will subclass from CIM_Dependency directly. // This file was automatically generated from CIM_ServiceServiceDependency.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_ServiceServiceDependency is an association between a Service and another Service, which indicates that the latter cooperates with the former, is required to be present, required to have completed, or must be absent for the former Service to provide its functionality. For example, Boot Services might be dependent upon underlying system initialization Services. In the case of the initialization Services, the Boot Service might be dependent on the completion of the init Services. ///When examining the ServiceServiceDependency class definition, note that its superclass ProvidesServiceToElement is deprecated. Unfortunately, ProvidesServiceToElement cannot be removed from the object hierarchy without a major Schema release. When or if a major release occurs, the ProvidesServiceToElement superclass will be removed, and ServiceServiceDependency will subclass from CIM_Dependency directly. /// [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ServiceServiceDependency")] [System.Xml.Serialization.XmlRootAttribute("CIM_ServiceServiceDependency", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ServiceServiceDependency", IsNullable=false)] public class CIM_ServiceServiceDependency : CIM_ProvidesServiceToElement { /// /// Default constructor. /// public CIM_ServiceServiceDependency() :base() { } /// /// Constructor that recieves an xml string for deserialization. /// /// xml string to deserialize public CIM_ServiceServiceDependency(string xml): base((IWSManClient)null) { this.Deserialize(xml); } /// /// Constructor which recieves a Ws-Management client object. /// /// Ws-Management client public CIM_ServiceServiceDependency(IWSManClient client): base(client) { } /// /// Required, The required Service. /// [CimField(true, false)] public override CimReference Antecedent { get { string innerXML = this.GetField("Antecedent")[0]; CimReference epr = new CimReference("Antecedent", XmlNamespace, innerXML); return epr; } set { this.SetOrAddField("Antecedent",value.Serialize(false)); } } /// /// Required, The Service that is dependent on an underlying Service. /// [CimField(true, false)] public override CimReference Dependent { get { string innerXML = this.GetField("Dependent")[0]; CimReference epr = new CimReference("Dependent", XmlNamespace, innerXML); return epr; } set { this.SetOrAddField("Dependent",value.Serialize(false)); } } /// /// Remove RestartService field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveRestartService() { RemoveField("RestartService"); } /// /// Is true if the field RestartService exists in the current object, /// otherwise is false. /// public virtual bool RestartServiceExist { get { return ContainsField("RestartService"); } } /// /// Optional, This property describes that the Antecedent Service must be restarted after the Dependent operation is complete. /// [CimField(false, false)] public virtual bool RestartService { get { return bool.Parse(this["RestartService"][0]); } set { this.SetOrAddField("RestartService",value.ToString().ToLower(CultureInfo.InvariantCulture)); } } /// /// Remove TypeOfDependency field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveTypeOfDependency() { RemoveField("TypeOfDependency"); } /// /// Is true if the field TypeOfDependency exists in the current object, /// otherwise is false. /// public virtual bool TypeOfDependencyExist { get { return ContainsField("TypeOfDependency"); } } /// /// Optional, The nature of the Service-to-Service dependency. 2 - Antecedent Service shall have completed before Dependent service's functionality is available. /// 3 - Antecedent Service shall have started before Dependent service's functionality is available. /// 4 - Antecedent Service shall not be started in order for Dependent service's functionality to be available. /// 5 - The two Services cooperate and augment each other's function. There is no requirement implied by this value regarding the execution of the Antecedent service in order for the Dependent service to operate. /// [CimField(false, false)] public virtual ushort TypeOfDependency { get { return ushort.Parse(this["TypeOfDependency"][0], CultureInfo.InvariantCulture); } set { this.SetOrAddField("TypeOfDependency",value.ToString(CultureInfo.InvariantCulture)); } } /// /// Enumerate instances of CIM_ServiceServiceDependency class at an endpoint. /// /// WS-Management client /// Keys for selecting the instances /// Collection of CIM_ServiceServiceDependency 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_ServiceServiceDependency class at an endpoint. /// /// WS-Management client /// Collection of CIM_ServiceServiceDependency objects public static new Collection Enumerate(IWSManClient client) { List ret = CimBase.Enumerate(client); return new Collection(ret); } /// /// Delete the instance of CIM_ServiceServiceDependency 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_ServiceServiceDependency class. /// public new class CimKeys : CIM_ProvidesServiceToElement.CimKeys { /// /// Required, The required Service. /// public virtual CimReference Antecedent { get { string innerXML = GetKey("Antecedent"); CimReference epr = new CimReference("Antecedent", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ServiceServiceDependency", innerXML); return epr; } set { SetOrAddKey("Antecedent", value); } } /// /// Required, The Service that is dependent on an underlying Service. /// public virtual CimReference Dependent { get { string innerXML = GetKey("Dependent"); CimReference epr = new CimReference("Dependent", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ServiceServiceDependency", innerXML); return epr; } set { SetOrAddKey("Dependent", value); } } } } }