456 lines
19 KiB
C#
456 lines
19 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: CIM_Service.cs
|
|
//
|
|
// Contents: A Service is a LogicalElement that represents the availability of functionality that can be managed. This functionality may be provided by a seperately modeled entity such as a LogicalDevice or a SoftwareFeature, or both. The modeled Service typically provides only functionality required for management of itself or the elements it affects.
|
|
// This file was automatically generated from CIM_Service.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>
|
|
///A Service is a LogicalElement that represents the availability of functionality that can be managed. This functionality may be provided by a seperately modeled entity such as a LogicalDevice or a SoftwareFeature, or both. The modeled Service typically provides only functionality required for management of itself or the elements it affects.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Service")]
|
|
[System.Xml.Serialization.XmlRootAttribute("CIM_Service", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Service", IsNullable=false)]
|
|
public class CIM_Service : CIM_EnabledLogicalElement
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public CIM_Service() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public CIM_Service(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_Service(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, CreationClassName indicates the name of the class or the subclass that is 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.
|
|
/// </summary>
|
|
[CimField(true, true)]
|
|
public virtual string CreationClassName
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("CreationClassName")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("CreationClassName",value);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, The Name property uniquely identifies the Service and provides an indication of the functionality that is managed. This functionality is described in more detail in the Description property of the object.
|
|
/// </summary>
|
|
[CimField(true, true)]
|
|
public override string Name
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("Name")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Name",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove PrimaryOwnerContact field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemovePrimaryOwnerContact()
|
|
{
|
|
RemoveField("PrimaryOwnerContact");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field PrimaryOwnerContact exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool PrimaryOwnerContactExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("PrimaryOwnerContact");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, A string that provides information on how the primary owner of the Service can be reached (for example, phone number, e-mail address, and so on).
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string PrimaryOwnerContact
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("PrimaryOwnerContact")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("PrimaryOwnerContact",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove PrimaryOwnerName field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemovePrimaryOwnerName()
|
|
{
|
|
RemoveField("PrimaryOwnerName");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field PrimaryOwnerName exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool PrimaryOwnerNameExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("PrimaryOwnerName");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The name of the primary owner for the service, if one is defined. The primary owner is the initial support contact for the Service.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string PrimaryOwnerName
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("PrimaryOwnerName")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("PrimaryOwnerName",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove StartMode field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveStartMode()
|
|
{
|
|
RemoveField("StartMode");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field StartMode exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool StartModeExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("StartMode");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Note: The use of this element is deprecated in lieu of the EnabledDefault property that is inherited from EnabledLogicalElement. The EnabledLogicalElement addresses the same semantics. The change to a uint16 data type was discussed when CIM V2.0 was defined. However, existing V1.0 implementations used the string property. To remain compatible with those implementations, StartMode was grandfathered into the schema. Use of the deprecated qualifier allows the maintenance of the existing property but also permits an improved, clarified definition using EnabledDefault.
|
|
/// Deprecated description: StartMode is a string value that indicates whether the Service is automatically started by a System, an Operating System, and so on, or is started only upon request.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string StartMode
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("StartMode")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("StartMode",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove Started field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveStarted()
|
|
{
|
|
RemoveField("Started");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field Started exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool StartedExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("Started");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Started is a Boolean that indicates whether the Service has been started (TRUE), or stopped (FALSE).
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual bool Started
|
|
{
|
|
get
|
|
{
|
|
return bool.Parse(this["Started"][0]);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Started",value.ToString().ToLower(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, The CreationClassName of the scoping System.
|
|
/// </summary>
|
|
[CimField(true, true)]
|
|
public virtual string SystemCreationClassName
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("SystemCreationClassName")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("SystemCreationClassName",value);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, The Name of the scoping System.
|
|
/// </summary>
|
|
[CimField(true, true)]
|
|
public virtual string SystemName
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("SystemName")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("SystemName",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
///The StartService method places the Service in the started state. Note that the function of this method overlaps with the RequestedState property. RequestedState was added to the model to maintain a record (such as a persisted value) of the last state request. Invoking the StartService method should set the RequestedState property appropriately. The method returns an integer value of 0 if the Service was successfully started, 1 if the request is not supported, and any other number to indicate an error. In a subclass, the set of possible return codes could be specified using a ValueMap qualifier on the method. The strings to which the ValueMap contents are translated can also be specified in the subclass as a Values array qualifier.
|
|
///Note: The semantics of this method overlap with the RequestStateChange method that is inherited from EnabledLogicalElement. This method is maintained because it has been widely implemented, and its simple "start" semantics are convenient to use.
|
|
/// </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_Service", IsNullable=false)]
|
|
private class StartService_INPUT : CimParams
|
|
{
|
|
public StartService_INPUT(string ns) : base(ns)
|
|
{
|
|
}
|
|
|
|
}
|
|
/// <summary>
|
|
///The StartService method places the Service in the started state. Note that the function of this method overlaps with the RequestedState property. RequestedState was added to the model to maintain a record (such as a persisted value) of the last state request. Invoking the StartService method should set the RequestedState property appropriately. The method returns an integer value of 0 if the Service was successfully started, 1 if the request is not supported, and any other number to indicate an error. In a subclass, the set of possible return codes could be specified using a ValueMap qualifier on the method. The strings to which the ValueMap contents are translated can also be specified in the subclass as a Values array qualifier.
|
|
///Note: The semantics of this method overlap with the RequestStateChange method that is inherited from EnabledLogicalElement. This method is maintained because it has been widely implemented, and its simple "start" semantics are convenient to use.
|
|
/// </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_Service", IsNullable=false)]
|
|
private class StartService_OUTPUT : CimParams
|
|
{
|
|
public StartService_OUTPUT() : base("")
|
|
{
|
|
}
|
|
|
|
}
|
|
/// <summary>
|
|
///The StartService method places the Service in the started state. Note that the function of this method overlaps with the RequestedState property. RequestedState was added to the model to maintain a record (such as a persisted value) of the last state request. Invoking the StartService method should set the RequestedState property appropriately. The method returns an integer value of 0 if the Service was successfully started, 1 if the request is not supported, and any other number to indicate an error. In a subclass, the set of possible return codes could be specified using a ValueMap qualifier on the method. The strings to which the ValueMap contents are translated can also be specified in the subclass as a Values array qualifier.
|
|
///Note: The semantics of this method overlap with the RequestStateChange method that is inherited from EnabledLogicalElement. This method is maintained because it has been widely implemented, and its simple "start" semantics are convenient to use.
|
|
/// </summary>
|
|
/// <returns>
|
|
/// </returns>
|
|
public virtual uint StartService()
|
|
{
|
|
StartService_INPUT input = new StartService_INPUT(this.XmlNamespace);
|
|
StartService_OUTPUT output = new StartService_OUTPUT();
|
|
uint returnValue = base.Invoke("StartService",input,out output);
|
|
return returnValue;
|
|
}
|
|
/// <summary>
|
|
///The StopService method places the Service in the stopped state. Note that the function of this method overlaps with the RequestedState property. RequestedState was added to the model to maintain a record (such as a persisted value) of the last state request. Invoking the StopService method should set the RequestedState property appropriately. The method returns an integer value of 0 if the Service was successfully stopped, 1 if the request is not supported, and any other number to indicate an error. In a subclass, the set of possible return codes could be specified using a ValueMap qualifier on the method. The strings to which the ValueMap contents are translated can also be specified in the subclass as a Values array qualifier.
|
|
///Note: The semantics of this method overlap with the RequestStateChange method that is inherited from EnabledLogicalElement. This method is maintained because it has been widely implemented, and its simple "stop" semantics are convenient to use.
|
|
/// </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_Service", IsNullable=false)]
|
|
private class StopService_INPUT : CimParams
|
|
{
|
|
public StopService_INPUT(string ns) : base(ns)
|
|
{
|
|
}
|
|
|
|
}
|
|
/// <summary>
|
|
///The StopService method places the Service in the stopped state. Note that the function of this method overlaps with the RequestedState property. RequestedState was added to the model to maintain a record (such as a persisted value) of the last state request. Invoking the StopService method should set the RequestedState property appropriately. The method returns an integer value of 0 if the Service was successfully stopped, 1 if the request is not supported, and any other number to indicate an error. In a subclass, the set of possible return codes could be specified using a ValueMap qualifier on the method. The strings to which the ValueMap contents are translated can also be specified in the subclass as a Values array qualifier.
|
|
///Note: The semantics of this method overlap with the RequestStateChange method that is inherited from EnabledLogicalElement. This method is maintained because it has been widely implemented, and its simple "stop" semantics are convenient to use.
|
|
/// </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_Service", IsNullable=false)]
|
|
private class StopService_OUTPUT : CimParams
|
|
{
|
|
public StopService_OUTPUT() : base("")
|
|
{
|
|
}
|
|
|
|
}
|
|
/// <summary>
|
|
///The StopService method places the Service in the stopped state. Note that the function of this method overlaps with the RequestedState property. RequestedState was added to the model to maintain a record (such as a persisted value) of the last state request. Invoking the StopService method should set the RequestedState property appropriately. The method returns an integer value of 0 if the Service was successfully stopped, 1 if the request is not supported, and any other number to indicate an error. In a subclass, the set of possible return codes could be specified using a ValueMap qualifier on the method. The strings to which the ValueMap contents are translated can also be specified in the subclass as a Values array qualifier.
|
|
///Note: The semantics of this method overlap with the RequestStateChange method that is inherited from EnabledLogicalElement. This method is maintained because it has been widely implemented, and its simple "stop" semantics are convenient to use.
|
|
/// </summary>
|
|
/// <returns>
|
|
/// </returns>
|
|
public virtual uint StopService()
|
|
{
|
|
StopService_INPUT input = new StopService_INPUT(this.XmlNamespace);
|
|
StopService_OUTPUT output = new StopService_OUTPUT();
|
|
uint returnValue = base.Invoke("StopService",input,out output);
|
|
return returnValue;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_Service 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_Service objects</returns>
|
|
public static new Collection<CIM_Service> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<CIM_Service> ret = CimBase.Enumerate<CIM_Service>(client, cimKeys);
|
|
return new Collection<CIM_Service>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_Service class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of CIM_Service objects</returns>
|
|
public static new Collection<CIM_Service> Enumerate(IWSManClient client)
|
|
{
|
|
List<CIM_Service> ret = CimBase.Enumerate<CIM_Service>(client);
|
|
return new Collection<CIM_Service>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of CIM_Service 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_Service>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the CIM_Service class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CIM_EnabledLogicalElement.CimKeys
|
|
{
|
|
/// <summary>
|
|
/// Key, Required, CreationClassName indicates the name of the class or the subclass that is 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.
|
|
/// </summary>
|
|
|
|
public virtual string CreationClassName
|
|
{
|
|
get
|
|
{
|
|
return GetKey("CreationClassName");
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("CreationClassName", value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Key, Required, The Name property uniquely identifies the Service and provides an indication of the functionality that is managed. This functionality is described in more detail in the Description property of the object.
|
|
/// </summary>
|
|
|
|
public virtual string Name
|
|
{
|
|
get
|
|
{
|
|
return GetKey("Name");
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("Name", value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Key, Required, The CreationClassName of the scoping System.
|
|
/// </summary>
|
|
|
|
public virtual string SystemCreationClassName
|
|
{
|
|
get
|
|
{
|
|
return GetKey("SystemCreationClassName");
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("SystemCreationClassName", value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Key, Required, The Name of the scoping System.
|
|
/// </summary>
|
|
|
|
public virtual string SystemName
|
|
{
|
|
get
|
|
{
|
|
return GetKey("SystemName");
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("SystemName", value);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|