redfish-codegen 0.3.1

An unopinionated translation of the Redfish specification into Rust.
Documentation
// Generated by redfish-codegen. Do not modify.

use redfish_macros::IntoRedfishMessage;

/// This registry defines the messages for task related events.
#[derive(Clone, Debug, IntoRedfishMessage)]
#[message(crate::models::message::v1_1_2::Message)]
pub enum TaskEvent {
    /// This message shall be used to indicate that a task has started as the `TaskState` property transitions to `Starting` or `Running`.
    #[message(message = "The task with Id '%1' has started.")]
    #[message(id = "TaskEvent.1.0.3.TaskStarted")]
    #[message(severity = "crate::models::resource::Health::OK")]
    #[message(resolution = "None.")]
    TaskStarted(
        /// This argument shall contain the value of the `Id` property of the task resource that has started.
        String,
    ),
    /// This message shall be used to indicate that a task has completed with errors and the `TaskState` property transitioned to `Exception`.
    #[message(message = "The task with Id '%1' has completed with errors.")]
    #[message(id = "TaskEvent.1.0.3.TaskAborted")]
    #[message(severity = "crate::models::resource::Health::Critical")]
    #[message(resolution = "None.")]
    TaskAborted(
        /// This argument shall contain the value of the `Id` property of the task resource that has completed with errors.
        String,
    ),
    /// This message shall be used to indicate that a task has completed and the `TaskState` property transitioned to `Completed`.
    #[message(message = "The task with Id '%1' has completed.")]
    #[message(id = "TaskEvent.1.0.3.TaskCompletedOK")]
    #[message(severity = "crate::models::resource::Health::OK")]
    #[message(resolution = "None.")]
    TaskCompletedOK(
        /// This argument shall contain the value of the `Id` property of the task resource that has completed.
        String,
    ),
    /// This message shall be used to indicate that a task has been paused and the `TaskState` property transitioned to `Suspended` or `Interrupted`.
    #[message(message = "The task with Id '%1' has been paused.")]
    #[message(id = "TaskEvent.1.0.3.TaskPaused")]
    #[message(severity = "crate::models::resource::Health::Warning")]
    #[message(resolution = "None.")]
    TaskPaused(
        /// This argument shall contain the value of the `Id` property of the task resource that has been paused.
        String,
    ),
    /// This message shall be used to indicate that work on a task has halted prior to completion due to an explicit request.  The `TaskState` property transitioned to `Cancelled`.
    #[message(message = "Work on the task with Id '%1' has been halted prior to completion due to an explicit request.")]
    #[message(id = "TaskEvent.1.0.3.TaskCancelled")]
    #[message(severity = "crate::models::resource::Health::Warning")]
    #[message(resolution = "None.")]
    TaskCancelled(
        /// This argument shall contain the value of the `Id` property of the task resource that has been halted.
        String,
    ),
    /// This message shall be used to indicate that a task has completed with warnings and the `TaskState` property transitioned to `Completed`.
    #[message(message = "The task with Id '%1' has completed with warnings.")]
    #[message(id = "TaskEvent.1.0.3.TaskCompletedWarning")]
    #[message(severity = "crate::models::resource::Health::Warning")]
    #[message(resolution = "None.")]
    TaskCompletedWarning(
        /// This argument shall contain the value of the `Id` property of the task resource that has completed with warnings.
        String,
    ),
    /// This message shall be used to indicate that a task has been removed.
    #[message(message = "The task with Id '%1' has been removed.")]
    #[message(id = "TaskEvent.1.0.3.TaskRemoved")]
    #[message(severity = "crate::models::resource::Health::Warning")]
    #[message(resolution = "None.")]
    TaskRemoved(
        /// This argument shall contain the value of the `Id` property of the task resource that has been removed.
        String,
    ),
    /// This message shall be used to indicate that a task has resumed and the `TaskState` property transitioned to `Running` from `Suspended` or `Interrupted`.
    #[message(message = "The task with Id '%1' has been resumed.")]
    #[message(id = "TaskEvent.1.0.3.TaskResumed")]
    #[message(severity = "crate::models::resource::Health::OK")]
    #[message(resolution = "None.")]
    TaskResumed(
        /// This argument shall contain the value of the `Id` property of the task resource that has been resumed.
        String,
    ),
    /// This message shall be used to indicate that a task has changed progress.
    #[message(message = "The task with Id '%1' has changed to progress %2 percent complete.")]
    #[message(id = "TaskEvent.1.0.3.TaskProgressChanged")]
    #[message(severity = "crate::models::resource::Health::OK")]
    #[message(resolution = "None.")]
    TaskProgressChanged(
        /// This argument shall contain the value of the `Id` property of the task resource that has changed progress.
        String,
        /// This argument shall contain the percent completion of the task that has changed progress.
        f64,
    ),
}