933 lines
29 KiB
C#
933 lines
29 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: CIM_Job.cs
|
|
//
|
|
// Contents: A Job is a LogicalElement that represents an executing unit of work, such as a script or a print job. A Job is distinct from a Process in that a Job can be scheduled or queued, and its execution is not limited to a single system.
|
|
// This file was automatically generated from CIM_Job.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 Job is a LogicalElement that represents an executing unit of work, such as a script or a print job. A Job is distinct from a Process in that a Job can be scheduled or queued, and its execution is not limited to a single system.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Job")]
|
|
[System.Xml.Serialization.XmlRootAttribute("CIM_Job", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Job", IsNullable=false)]
|
|
public class CIM_Job : CIM_LogicalElement
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public CIM_Job() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public CIM_Job(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_Job(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Remove DeleteOnCompletion field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveDeleteOnCompletion()
|
|
{
|
|
RemoveField("DeleteOnCompletion");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field DeleteOnCompletion exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool DeleteOnCompletionExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("DeleteOnCompletion");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Indicates whether or not the job should be automatically deleted upon completion. Note that the 'completion' of a recurring job is defined by its JobRunTimes or UntilTime properties, or when the Job is terminated by manual intervention. If this property is set to false and the job completes, then the extrinsic method DeleteInstance must be used to delete the job instead of updating this property.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual bool DeleteOnCompletion
|
|
{
|
|
get
|
|
{
|
|
return bool.Parse(this["DeleteOnCompletion"][0]);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("DeleteOnCompletion",value.ToString().ToLower(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove ElapsedTime field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveElapsedTime()
|
|
{
|
|
RemoveField("ElapsedTime");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field ElapsedTime exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool ElapsedTimeExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("ElapsedTime");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The time interval that the Job has been executing or the total execution time if the Job is complete. Note that this property is also present in the JobProcessingStatistics class. This class is necessary to capture the processing information for recurring Jobs, because only the 'last' run time can be stored in this single-valued property.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual CimDateTime ElapsedTime
|
|
{
|
|
get
|
|
{
|
|
return CimDateTime.Parse(this["ElapsedTime"][0]);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("ElapsedTime",value.ToString());
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove ErrorCode field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveErrorCode()
|
|
{
|
|
RemoveField("ErrorCode");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field ErrorCode exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool ErrorCodeExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("ErrorCode");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, A vendor-specific error code. The value must be set to zero if the Job completed without error. Note that this property is also present in the JobProcessingStatistics class. This class is necessary to capture the processing information for recurring Jobs, because only the 'last' run error can be stored in this single-valued property.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ushort ErrorCode
|
|
{
|
|
get
|
|
{
|
|
return ushort.Parse(this["ErrorCode"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("ErrorCode",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove ErrorDescription field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveErrorDescription()
|
|
{
|
|
RemoveField("ErrorDescription");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field ErrorDescription exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool ErrorDescriptionExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("ErrorDescription");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, A free-form string that contains the vendor error description. Note that this property is also present in the JobProcessingStatistics class. This class is necessary to capture the processing information for recurring Jobs, because only the 'last' run error can be stored in this single-valued property.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string ErrorDescription
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("ErrorDescription")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("ErrorDescription",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove JobRunTimes field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveJobRunTimes()
|
|
{
|
|
RemoveField("JobRunTimes");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field JobRunTimes exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool JobRunTimesExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("JobRunTimes");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The number of times that the Job should be run. A value of 1 indicates that the Job is not recurring, while any non-zero value indicates a limit to the number of times that the Job will recur. Zero indicates that there is no limit to the number of times that the Job can be processed, but that it is terminated either after the UntilTime or by manual intervention. By default, a Job is processed once.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual uint JobRunTimes
|
|
{
|
|
get
|
|
{
|
|
return uint.Parse(this["JobRunTimes"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("JobRunTimes",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove JobStatus field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveJobStatus()
|
|
{
|
|
RemoveField("JobStatus");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field JobStatus exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool JobStatusExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("JobStatus");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, A free-form string that represents the status of the job. The primary status is reflected in the inherited OperationalStatus property. JobStatus provides additional, implementation-specific details.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string JobStatus
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("JobStatus")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("JobStatus",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove LocalOrUtcTime field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveLocalOrUtcTime()
|
|
{
|
|
RemoveField("LocalOrUtcTime");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field LocalOrUtcTime exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool LocalOrUtcTimeExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("LocalOrUtcTime");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, This property indicates whether the times represented in the RunStartInterval and UntilTime properties represent local times or UTC times. Time values are synchronized worldwide by using the enumeration value 2, "UTC Time".
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ushort LocalOrUtcTime
|
|
{
|
|
get
|
|
{
|
|
return ushort.Parse(this["LocalOrUtcTime"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("LocalOrUtcTime",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove Notify field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveNotify()
|
|
{
|
|
RemoveField("Notify");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field Notify exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool NotifyExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("Notify");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The User who is to be notified upon the Job completion or failure.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string Notify
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("Notify")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Notify",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove OtherRecoveryAction field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveOtherRecoveryAction()
|
|
{
|
|
RemoveField("OtherRecoveryAction");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field OtherRecoveryAction exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool OtherRecoveryActionExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("OtherRecoveryAction");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, A string describing the recovery action when the RecoveryAction property of the instance is 1 ("Other").
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string OtherRecoveryAction
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("OtherRecoveryAction")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("OtherRecoveryAction",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove Owner field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveOwner()
|
|
{
|
|
RemoveField("Owner");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field Owner exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool OwnerExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("Owner");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The User that submitted the Job, or the Service or method name that caused the job to be created.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string Owner
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("Owner")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Owner",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove PercentComplete field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemovePercentComplete()
|
|
{
|
|
RemoveField("PercentComplete");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field PercentComplete exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool PercentCompleteExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("PercentComplete");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The percentage of the job that has completed at the time that this value is requested. Note that this property is also present in the JobProcessingStatistics class. This class is necessary to capture the processing information for recurring Jobs, because only the 'last' run data can be stored in this single-valued property.
|
|
/// Note that the value 101 is undefined and will be not be allowed in the next major revision of the specification.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ushort PercentComplete
|
|
{
|
|
get
|
|
{
|
|
return ushort.Parse(this["PercentComplete"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("PercentComplete",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove Priority field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemovePriority()
|
|
{
|
|
RemoveField("Priority");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field Priority exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool PriorityExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("Priority");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Indicates the urgency or importance of execution of the Job. The lower the number, the higher the priority. Note that this property is also present in the JobProcessingStatistics class. This class is necessary to capture the setting information that would influence the results of a job.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual uint Priority
|
|
{
|
|
get
|
|
{
|
|
return uint.Parse(this["Priority"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Priority",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove RecoveryAction field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveRecoveryAction()
|
|
{
|
|
RemoveField("RecoveryAction");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field RecoveryAction exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool RecoveryActionExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("RecoveryAction");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Describes the recovery action to be taken for an unsuccessfully run Job. The possible values are:
|
|
/// 0 = "Unknown", meaning it is unknown as to what recovery action to take
|
|
/// 1 = "Other", indicating that the recovery action will be specified in the OtherRecoveryAction property
|
|
/// 2 = "Do Not Continue", meaning stop the execution of the job and appropriately update its status
|
|
/// 3 = "Continue With Next Job", meaning continue with the next job in the queue
|
|
/// 4 = "Re-run Job", indicating that the job should be re-run
|
|
/// 5 = "Run Recovery Job", meaning run the Job associated using the RecoveryJob relationship. Note that the recovery Job must already be in the queue from which it will run.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ushort RecoveryAction
|
|
{
|
|
get
|
|
{
|
|
return ushort.Parse(this["RecoveryAction"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("RecoveryAction",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove RunDay field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveRunDay()
|
|
{
|
|
RemoveField("RunDay");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field RunDay exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool RunDayExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("RunDay");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The day in the month on which the Job should be processed. There are two different interpretations for this property, depending on the value of DayOfWeek. In one case, RunDay defines the day-in-month on which the Job is processed. This interpretation is used when the DayOfWeek is 0. A positive or negative integer indicates whether the RunDay should be calculated from the beginning or end of the month. For example, 5 indicates the fifth day in the RunMonth and -1 indicates the last day in the RunMonth.
|
|
///
|
|
/// When RunDayOfWeek is not 0, RunDay is the day-in-month on which the Job is processed, defined in conjunction with RunDayOfWeek. For example, if RunDay is 15 and RunDayOfWeek is Saturday, then the Job is processed on the first Saturday on or after the 15th day in the RunMonth (for example, the third Saturday in the month). If RunDay is 20 and RunDayOfWeek is -Saturday, then this indicates the first Saturday on or before the 20th day in the RunMonth. If RunDay is -1 and RunDayOfWeek is -Sunday, then this indicates the last Sunday in the RunMonth.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual sbyte RunDay
|
|
{
|
|
get
|
|
{
|
|
return sbyte.Parse(this["RunDay"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("RunDay",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove RunDayOfWeek field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveRunDayOfWeek()
|
|
{
|
|
RemoveField("RunDayOfWeek");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field RunDayOfWeek exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool RunDayOfWeekExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("RunDayOfWeek");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, A positive or negative integer used in conjunction with RunDay to indicate the day of the week on which the Job is processed. RunDayOfWeek is set to 0 to indicate an exact day of the month, such as March 1. A positive integer (representing Sunday, Monday, ..., Saturday) means that the day of week is found on or after the specified RunDay. A negative integer (representing -Sunday, -Monday, ..., -Saturday) means that the day of week is found on or BEFORE the RunDay.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual sbyte RunDayOfWeek
|
|
{
|
|
get
|
|
{
|
|
return sbyte.Parse(this["RunDayOfWeek"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("RunDayOfWeek",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove RunMonth field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveRunMonth()
|
|
{
|
|
RemoveField("RunMonth");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field RunMonth exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool RunMonthExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("RunMonth");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The month during which the Job should be processed. Specify 0 for January, 1 for February, and so on.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual byte RunMonth
|
|
{
|
|
get
|
|
{
|
|
return byte.Parse(this["RunMonth"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("RunMonth",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove RunStartInterval field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveRunStartInterval()
|
|
{
|
|
RemoveField("RunStartInterval");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field RunStartInterval exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool RunStartIntervalExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("RunStartInterval");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The time interval after midnight when the Job should be processed. For example,
|
|
/// 00000000020000.000000:000
|
|
/// indicates that the Job should be run on or after two o'clock, local time or UTC time (distinguished using the LocalOrUtcTime property.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual CimDateTime RunStartInterval
|
|
{
|
|
get
|
|
{
|
|
return CimDateTime.Parse(this["RunStartInterval"][0]);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("RunStartInterval",value.ToString());
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove ScheduledStartTime field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveScheduledStartTime()
|
|
{
|
|
RemoveField("ScheduledStartTime");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field ScheduledStartTime exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool ScheduledStartTimeExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("ScheduledStartTime");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The time that the current Job is scheduled to start. This time can be represented by the actual date and time, or an interval relative to the time that this property is requested. A value of all zeroes indicates that the Job is already executing. The property is deprecated in lieu of the more expressive scheduling properties, RunMonth, RunDay, RunDayOfWeek, and RunStartInterval.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual CimDateTime ScheduledStartTime
|
|
{
|
|
get
|
|
{
|
|
return CimDateTime.Parse(this["ScheduledStartTime"][0]);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("ScheduledStartTime",value.ToString());
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove StartTime field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveStartTime()
|
|
{
|
|
RemoveField("StartTime");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field StartTime exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool StartTimeExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("StartTime");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The time that the Job was actually started. This time can be represented by an actual date and time, or by an interval relative to the time that this property is requested. Note that this property is also present in the JobProcessingStatistics class. This class is necessary to capture the processing information for recurring Jobs, because only the 'last' run time can be stored in this single-valued property.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual CimDateTime StartTime
|
|
{
|
|
get
|
|
{
|
|
return CimDateTime.Parse(this["StartTime"][0]);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("StartTime",value.ToString());
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove TimeSubmitted field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveTimeSubmitted()
|
|
{
|
|
RemoveField("TimeSubmitted");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field TimeSubmitted exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool TimeSubmittedExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("TimeSubmitted");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The time that the Job was submitted to execute. A value of all zeroes indicates that the owning element is not capable of reporting a date and time. Therefore, the ScheduledStartTime and StartTime are reported as intervals relative to the time their values are requested.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual CimDateTime TimeSubmitted
|
|
{
|
|
get
|
|
{
|
|
return CimDateTime.Parse(this["TimeSubmitted"][0]);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("TimeSubmitted",value.ToString());
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove UntilTime field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveUntilTime()
|
|
{
|
|
RemoveField("UntilTime");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field UntilTime exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool UntilTimeExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("UntilTime");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The time after which the Job is invalid or should be stopped. This time can be represented by an actual date and time, or by an interval relative to the time that this property is requested. A value of all nines indicates that the Job can run indefinitely.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual CimDateTime UntilTime
|
|
{
|
|
get
|
|
{
|
|
return CimDateTime.Parse(this["UntilTime"][0]);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("UntilTime",value.ToString());
|
|
}
|
|
}
|
|
/// <summary>
|
|
///KillJob is being deprecated because there is no distinction made between an orderly shutdown and an immediate kill. CIM_ConcreteJob.RequestStateChange() provides 'Terminate' and 'Kill' options to allow this distinction.
|
|
///A method to kill this job and any underlying processes, and to remove any 'dangling' associations.
|
|
/// </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_Job", IsNullable=false)]
|
|
private class KillJob_INPUT : CimParams
|
|
{
|
|
public KillJob_INPUT(string ns) : base(ns)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Indicates whether or not the Job should be automatically deleted upon termination. This parameter takes precedence over the property, DeleteOnCompletion.
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual bool DeleteOnKill
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("DeleteOnKill",value.ToString().ToLower(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///KillJob is being deprecated because there is no distinction made between an orderly shutdown and an immediate kill. CIM_ConcreteJob.RequestStateChange() provides 'Terminate' and 'Kill' options to allow this distinction.
|
|
///A method to kill this job and any underlying processes, and to remove any 'dangling' associations.
|
|
/// </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_Job", IsNullable=false)]
|
|
private class KillJob_OUTPUT : CimParams
|
|
{
|
|
public KillJob_OUTPUT() : base("")
|
|
{
|
|
}
|
|
|
|
}
|
|
/// <summary>
|
|
///KillJob is being deprecated because there is no distinction made between an orderly shutdown and an immediate kill. CIM_ConcreteJob.RequestStateChange() provides 'Terminate' and 'Kill' options to allow this distinction.
|
|
///A method to kill this job and any underlying processes, and to remove any 'dangling' associations.
|
|
/// </summary>
|
|
/// <param name="inDeleteOnKill">Optional, IN -Indicates whether or not the Job should be automatically deleted upon termination. This parameter takes precedence over the property, DeleteOnCompletion.</param>
|
|
/// <returns>
|
|
/// Legal values:
|
|
/// Success : 0
|
|
/// Not Supported : 1
|
|
/// Unknown : 2
|
|
/// Timeout : 3
|
|
/// Failed : 4
|
|
/// Access Denied : 6
|
|
/// Not Found : 7
|
|
/// DMTF Reserved : ..
|
|
/// Vendor Specific : 32768..65535
|
|
/// </returns>
|
|
public virtual uint KillJob(bool? inDeleteOnKill)
|
|
{
|
|
KillJob_INPUT input = new KillJob_INPUT(this.XmlNamespace);
|
|
if (inDeleteOnKill.HasValue)
|
|
input.DeleteOnKill=inDeleteOnKill.Value;
|
|
KillJob_OUTPUT output = new KillJob_OUTPUT();
|
|
uint returnValue = base.Invoke("KillJob",input,out output);
|
|
return returnValue;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_Job 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_Job objects</returns>
|
|
public static new Collection<CIM_Job> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<CIM_Job> ret = CimBase.Enumerate<CIM_Job>(client, cimKeys);
|
|
return new Collection<CIM_Job>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_Job class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of CIM_Job objects</returns>
|
|
public static new Collection<CIM_Job> Enumerate(IWSManClient client)
|
|
{
|
|
List<CIM_Job> ret = CimBase.Enumerate<CIM_Job>(client);
|
|
return new Collection<CIM_Job>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of CIM_Job 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_Job>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the CIM_Job class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CIM_LogicalElement.CimKeys
|
|
{
|
|
}
|
|
|
|
}
|
|
}
|
|
|