//----------------------------------------------------------------------------
//
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
//
// File: AMT_AlarmClockService.cs
//
// Contents: AMT Alarm Clock Service derived from Service and provides the ability to set an alarm time to turn the host computer system on. Setting an alarm time is done by calling "AddAlarm" method."NextAMTAlarmTime" and "AMTAlarmClockInterval" properties are deprecated and "AddAlarm" should be used instead.
// This file was automatically generated from AMT_AlarmClockService.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
{
///
///AMT Alarm Clock Service derived from Service and provides the ability to set an alarm time to turn the host computer system on. Setting an alarm time is done by calling "AddAlarm" method."NextAMTAlarmTime" and "AMTAlarmClockInterval" properties are deprecated and "AddAlarm" should be used instead.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService")]
[System.Xml.Serialization.XmlRootAttribute("AMT_AlarmClockService", Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService", IsNullable=false)]
public class AMT_AlarmClockService : CIM_Service
{
///
/// Default constructor.
///
public AMT_AlarmClockService() :base()
{
}
///
/// Constructor that recieves an xml string for deserialization.
///
/// xml string to deserialize
public AMT_AlarmClockService(string xml): base((IWSManClient)null)
{
this.Deserialize(xml);
}
///
/// Constructor which recieves a Ws-Management client object.
///
/// Ws-Management client
public AMT_AlarmClockService(IWSManClient client): base(client)
{
}
///
/// Remove AMTAlarmClockInterval field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveAMTAlarmClockInterval()
{
RemoveField("AMTAlarmClockInterval");
}
///
/// Is true if the field AMTAlarmClockInterval exists in the current object,
/// otherwise is false.
///
public virtual bool AMTAlarmClockIntervalExist
{
get
{
return ContainsField("AMTAlarmClockInterval");
}
}
///
/// Optional, Specifies the alarm time interval. "AMTAlarmClockInterval" must be in Interval format.This property is deprecated, you should use the AddAlarm() method instead.
///
[CimField(false, false)]
public virtual CimDateTime AMTAlarmClockInterval
{
get
{
return CimDateTime.Parse(this["AMTAlarmClockInterval"][0]);
}
set
{
this.SetOrAddField("AMTAlarmClockInterval",value.ToString());
}
}
///
/// Remove NextAMTAlarmTime field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveNextAMTAlarmTime()
{
RemoveField("NextAMTAlarmTime");
}
///
/// Is true if the field NextAMTAlarmTime exists in the current object,
/// otherwise is false.
///
public virtual bool NextAMTAlarmTimeExist
{
get
{
return ContainsField("NextAMTAlarmTime");
}
}
///
/// Optional, Specifies the next AMT alarm time. "NextAMTAlarmTime" must be in Datetime format.This property is deprecated, you should use the AddAlarm() method instead.
///
[CimField(false, false)]
public virtual CimDateTime NextAMTAlarmTime
{
get
{
return CimDateTime.Parse(this["NextAMTAlarmTime"][0]);
}
set
{
this.SetOrAddField("NextAMTAlarmTime",value.ToString());
}
}
///
///This method creates an alarm that would wake the system at a given time.The method receives as input an embedded instance of type IPS_AlarmClockOccurrence, with the following fields set: StartTime, Interval, InstanceID, DeleteOnCompletion. Upon success, the method creates an instance of IPS_AlarmClockOccurrence which is associated with AlarmClockService.The method would fail if 5 instances or more of IPS_AlarmClockOccurrence already exist in the system.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService", IsNullable=false)]
private class AddAlarm_INPUT : CimParams
{
public AddAlarm_INPUT(string ns) : base(ns)
{
}
///
/// Required, A template for creating a new alarm of type IPS_AlarmClockOccurrence.
///
[CimField(false,true)]
public virtual IPS_AlarmClockOccurrence AlarmTemplate
{
set
{
this.SetOrAddField("AlarmTemplate",value.SerializeInner());
}
}
}
///
///This method creates an alarm that would wake the system at a given time.The method receives as input an embedded instance of type IPS_AlarmClockOccurrence, with the following fields set: StartTime, Interval, InstanceID, DeleteOnCompletion. Upon success, the method creates an instance of IPS_AlarmClockOccurrence which is associated with AlarmClockService.The method would fail if 5 instances or more of IPS_AlarmClockOccurrence already exist in the system.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService", IsNullable=false)]
private class AddAlarm_OUTPUT : CimParams
{
public AddAlarm_OUTPUT() : base("")
{
}
///
/// Optional, A reference to the created instance of IPS_AlarmClockOccurrence.
///
[CimField(false,false)]
public virtual CimReference AlarmClock
{
get
{
string innerXML = this.GetField("AlarmClock")[0];
CimReference epr = new CimReference("AlarmClock", "http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService", innerXML);
return epr;
}
}
}
///
///This method creates an alarm that would wake the system at a given time.The method receives as input an embedded instance of type IPS_AlarmClockOccurrence, with the following fields set: StartTime, Interval, InstanceID, DeleteOnCompletion. Upon success, the method creates an instance of IPS_AlarmClockOccurrence which is associated with AlarmClockService.The method would fail if 5 instances or more of IPS_AlarmClockOccurrence already exist in the system.
///
/// Required, IN -A template for creating a new alarm of type IPS_AlarmClockOccurrence.
/// OUT - A reference to the created instance of IPS_AlarmClockOccurrence.
///
///
public virtual uint AddAlarm(IPS_AlarmClockOccurrence inAlarmTemplate,out CimReference outAlarmClock)
{
AddAlarm_INPUT input = new AddAlarm_INPUT(this.XmlNamespace);
if (inAlarmTemplate != null)
input.AlarmTemplate=inAlarmTemplate;
AddAlarm_OUTPUT output = new AddAlarm_OUTPUT();
uint returnValue = base.Invoke("AddAlarm",input,out output);
outAlarmClock=null;
if (returnValue == 0)
{
if (output.ContainsField("AlarmClock"))
outAlarmClock = output.AlarmClock;
}
return returnValue;
}
///
/// Enumerate instances of AMT_AlarmClockService class at an endpoint.
///
/// WS-Management client
/// Keys for selecting the instances
/// Collection of AMT_AlarmClockService objects
public static new Collection Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
{
List ret = CimBase.Enumerate(client, cimKeys);
return new Collection(ret);
}
///
/// Enumerate instances of AMT_AlarmClockService class at an endpoint.
///
/// WS-Management client
/// Collection of AMT_AlarmClockService objects
public static new Collection Enumerate(IWSManClient client)
{
List ret = CimBase.Enumerate(client);
return new Collection(ret);
}
///
/// Delete the instance of AMT_AlarmClockService 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 AMT_AlarmClockService class.
///
public new class CimKeys : CIM_Service.CimKeys
{
}
}
}