288 lines
13 KiB
C#
288 lines
13 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: AMT_UserInitiatedConnectionService.cs
|
|
//
|
|
// Contents: Represents the user initiated connection service in the Intel(R) AMT subsystem.
|
|
// This file was automatically generated from AMT_UserInitiatedConnectionService.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>
|
|
///Represents the user initiated connection service in the Intel(R) AMT subsystem.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_UserInitiatedConnectionService")]
|
|
[System.Xml.Serialization.XmlRootAttribute("AMT_UserInitiatedConnectionService", Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_UserInitiatedConnectionService", IsNullable=false)]
|
|
public class AMT_UserInitiatedConnectionService : CIM_Service
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public AMT_UserInitiatedConnectionService() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public AMT_UserInitiatedConnectionService(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 AMT_UserInitiatedConnectionService(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Remove EnabledState field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public override void RemoveEnabledState()
|
|
{
|
|
RemoveField("EnabledState");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field EnabledState exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public override bool EnabledStateExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("EnabledState");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, EnabledState is an integer enumeration that indicates the enabled and disabled states of an element. It can also indicate the transitions between these requested states. For example, shutting down (value=4) and starting (value=10) are transient states between enabled and disabled. The following text briefly summarizes the various enabled and disabled states:
|
|
/// Enabled (2) indicates that the element is or could be executing commands, will process any queued commands, and queues new requests.
|
|
/// Disabled (3) indicates that the element will not execute commands and will drop any new requests.
|
|
/// Shutting Down (4) indicates that the element is in the process of going to a Disabled state.
|
|
/// Not Applicable (5) indicates the element does not support being enabled or disabled.
|
|
/// Enabled but Offline (6) indicates that the element might be completing commands, and will drop any new requests.
|
|
/// Test (7) indicates that the element is in a test state.
|
|
/// Deferred (8) indicates that the element might be completing commands, but will queue any new requests.
|
|
/// Quiesce (9) indicates that the element is enabled but in a restricted mode. The behavior of the element is similar to the Enabled state, but it processes only a restricted set of commands. All other requests are queued.
|
|
/// Starting (10) indicates that the element is in the process of going to an Enabled state. New requests are queued.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public override ushort EnabledState
|
|
{
|
|
get
|
|
{
|
|
return ushort.Parse(this["EnabledState"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("EnabledState",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove LastConnectionReason field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveLastConnectionReason()
|
|
{
|
|
RemoveField("LastConnectionReason");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field LastConnectionReason exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool LastConnectionReasonExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("LastConnectionReason");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Represents the reason for the most recent user initiated connection.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string LastConnectionReason
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("LastConnectionReason")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("LastConnectionReason",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
///Requests that the state of the element be changed to the value specified in the RequestedState parameter. When the requested state change takes place, the EnabledState and RequestedState of the element will be the same. Invoking the RequestStateChange method multiple times could result in earlier requests being overwritten or lost.
|
|
///If 0 is returned, then the task completed successfully and the use of ConcreteJob was not required. If 4096 (0x1000) is returned, then the task will take some time to complete, ConcreteJob will be created, and its reference returned in the output parameter Job. Any other return code indicates an error condition.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_UserInitiatedConnectionService", IsNullable=false)]
|
|
private class RequestStateChange_INPUT : CimParams
|
|
{
|
|
public RequestStateChange_INPUT(string ns) : base(ns)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The state requested for the element. This information will be placed into the RequestedState property of the instance if the return code of the RequestStateChange method is 0 ('Completed with No Error'), 3 ('Timeout'), or 4096 (0x1000) ('Job Started'). Refer to the description of the EnabledState and RequestedState properties for the detailed explanations of the RequestedState values.
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual ushort RequestedState
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("RequestedState",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Optional, A timeout period that specifies the maximum amount of time that the client expects the transition to the new state to take. The interval format must be used to specify the TimeoutPeriod. A value of 0 or a null parameter indicates that the client has no time requirements for the transition.
|
|
/// If this property does not contain 0 or null and the implementation does not support this parameter, a return code of 'Use Of Timeout Parameter Not Supported' must be returned.
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual CimDateTime TimeoutPeriod
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("TimeoutPeriod",value.ToString());
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///Requests that the state of the element be changed to the value specified in the RequestedState parameter. When the requested state change takes place, the EnabledState and RequestedState of the element will be the same. Invoking the RequestStateChange method multiple times could result in earlier requests being overwritten or lost.
|
|
///If 0 is returned, then the task completed successfully and the use of ConcreteJob was not required. If 4096 (0x1000) is returned, then the task will take some time to complete, ConcreteJob will be created, and its reference returned in the output parameter Job. Any other return code indicates an error condition.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_UserInitiatedConnectionService", IsNullable=false)]
|
|
private class RequestStateChange_OUTPUT : CimParams
|
|
{
|
|
public RequestStateChange_OUTPUT() : base("")
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Reference to the job (can be null if the task is completed).
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual CimReference Job
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("Job")[0];
|
|
CimReference epr = new CimReference("Job", "http://intel.com/wbem/wscim/1/amt-schema/1/AMT_UserInitiatedConnectionService", innerXML);
|
|
return epr;
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///Requests that the state of the element be changed to the value specified in the RequestedState parameter. When the requested state change takes place, the EnabledState and RequestedState of the element will be the same. Invoking the RequestStateChange method multiple times could result in earlier requests being overwritten or lost.
|
|
///If 0 is returned, then the task completed successfully and the use of ConcreteJob was not required. If 4096 (0x1000) is returned, then the task will take some time to complete, ConcreteJob will be created, and its reference returned in the output parameter Job. Any other return code indicates an error condition.
|
|
/// </summary>
|
|
/// <param name="inRequestedState">Optional, IN -The state requested for the element. This information will be placed into the RequestedState property of the instance if the return code of the RequestStateChange method is 0 ('Completed with No Error'), 3 ('Timeout'), or 4096 (0x1000) ('Job Started'). Refer to the description of the EnabledState and RequestedState properties for the detailed explanations of the RequestedState values.</param>
|
|
/// <param name="inTimeoutPeriod">Optional, IN -A timeout period that specifies the maximum amount of time that the client expects the transition to the new state to take. The interval format must be used to specify the TimeoutPeriod. A value of 0 or a null parameter indicates that the client has no time requirements for the transition.
|
|
/// If this property does not contain 0 or null and the implementation does not support this parameter, a return code of 'Use Of Timeout Parameter Not Supported' must be returned.</param>
|
|
/// <param name="outJob">OUT - Reference to the job (can be null if the task is completed).</param>
|
|
/// <returns>
|
|
/// Legal values:
|
|
/// Completed with No Error : 0
|
|
/// Not Supported : 1
|
|
/// Unknown or Unspecified Error : 2
|
|
/// Cannot complete within Timeout Period : 3
|
|
/// Failed : 4
|
|
/// Invalid Parameter : 5
|
|
/// In Use : 6
|
|
/// DMTF Reserved : ..
|
|
/// Method Parameters Checked - Job Started : 4096
|
|
/// Invalid State Transition : 4097
|
|
/// Use of Timeout Parameter Not Supported : 4098
|
|
/// Busy : 4099
|
|
/// Method Reserved : 4100..32767
|
|
/// Vendor Specific : 32768..65535
|
|
/// </returns>
|
|
public override uint RequestStateChange(ushort? inRequestedState,CimDateTime inTimeoutPeriod,out CimReference outJob)
|
|
{
|
|
RequestStateChange_INPUT input = new RequestStateChange_INPUT(this.XmlNamespace);
|
|
if (inRequestedState.HasValue)
|
|
input.RequestedState=inRequestedState.Value;
|
|
if (inTimeoutPeriod != null)
|
|
input.TimeoutPeriod=inTimeoutPeriod;
|
|
RequestStateChange_OUTPUT output = new RequestStateChange_OUTPUT();
|
|
uint returnValue = base.Invoke("RequestStateChange",input,out output);
|
|
outJob=null;
|
|
if (returnValue == 0)
|
|
{
|
|
if (output.ContainsField("Job"))
|
|
outJob = output.Job;
|
|
}
|
|
return returnValue;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of AMT_UserInitiatedConnectionService class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <param name="cimKeys">Keys for selecting the instances</param>
|
|
/// <returns>Collection of AMT_UserInitiatedConnectionService objects</returns>
|
|
public static new Collection<AMT_UserInitiatedConnectionService> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<AMT_UserInitiatedConnectionService> ret = CimBase.Enumerate<AMT_UserInitiatedConnectionService>(client, cimKeys);
|
|
return new Collection<AMT_UserInitiatedConnectionService>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of AMT_UserInitiatedConnectionService class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of AMT_UserInitiatedConnectionService objects</returns>
|
|
public static new Collection<AMT_UserInitiatedConnectionService> Enumerate(IWSManClient client)
|
|
{
|
|
List<AMT_UserInitiatedConnectionService> ret = CimBase.Enumerate<AMT_UserInitiatedConnectionService>(client);
|
|
return new Collection<AMT_UserInitiatedConnectionService>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of AMT_UserInitiatedConnectionService 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<AMT_UserInitiatedConnectionService>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the AMT_UserInitiatedConnectionService class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CIM_Service.CimKeys
|
|
{
|
|
}
|
|
|
|
}
|
|
}
|
|
|