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 to use for resource events.
#[derive(Clone, Debug, IntoRedfishMessage)]
#[message(crate::models::message::v1_1_2::Message)]
pub enum ResourceEvent {
    /// This message shall be used to indicate that the value of the PowerState property of a resource has changed to `PoweringOff`.  This message should not be used if the PowerState transition to `Off` will occur immediately.
    #[message(message = "The resource `%1` is powering off.")]
    #[message(id = "ResourceEvent.1.3.0.ResourcePoweringOff")]
    #[message(severity = "crate::models::resource::Health::OK")]
    #[message(resolution = "None.")]
    ResourcePoweringOff(
        /// This argument shall contain the name of the relevant Redfish resource.
        String,
    ),
    /// This message shall be used to indicate that the value of the PowerState property of a resource has changed to `Paused`.
    #[message(message = "The resource `%1` has been paused.")]
    #[message(id = "ResourceEvent.1.3.0.ResourcePaused")]
    #[message(severity = "crate::models::resource::Health::OK")]
    #[message(resolution = "None.")]
    ResourcePaused(
        /// This argument shall contain the name of the relevant Redfish resource.
        String,
    ),
    /// This message shall be used to indicate that the URI for a resource has changed.
    #[message(message = "The URI for the resource has changed.")]
    #[message(id = "ResourceEvent.1.3.0.URIForResourceChanged")]
    #[message(severity = "crate::models::resource::Health::OK")]
    #[message(resolution = "None.")]
    URIForResourceChanged,

    /// This message shall be used to indicate that a specified resource property has cleared its error threshold.
    #[message(message = "The resource property %1 has cleared the error threshold of value %2.")]
    #[message(id = "ResourceEvent.1.3.0.ResourceErrorThresholdCleared")]
    #[message(severity = "crate::models::resource::Health::OK")]
    #[message(resolution = "None.")]
    ResourceErrorThresholdCleared(
        /// This argument shall contain the name of the relevant property from a Redfish resource.
        String,
        /// This argument shall contain the value of the relevant error threshold.
        f64,
    ),
    /// This message shall be used to indicate that the health of a resource has changed to Warning.
    #[message(message = "The health of resource `%1` has changed to %2.")]
    #[message(id = "ResourceEvent.1.3.0.ResourceStatusChangedWarning")]
    #[message(severity = "crate::models::resource::Health::Warning")]
    #[message(resolution = "None.")]
    ResourceStatusChangedWarning(
        /// This argument shall contain the name of the relevant Redfish resource.
        String,
        /// This argument shall contain the value of the `Health` property for the relevant Redfish resource.  The values shall be used from the definition of the `Health` enumeration in the `Resource` schema.
        String,
    ),
    /// This message shall be used to indicate that the health of a resource has changed to Critical.
    #[message(message = "The health of resource `%1` has changed to %2.")]
    #[message(id = "ResourceEvent.1.3.0.ResourceStatusChangedCritical")]
    #[message(severity = "crate::models::resource::Health::Critical")]
    #[message(resolution = "None.")]
    ResourceStatusChangedCritical(
        /// This argument shall contain the name of the relevant Redfish resource.
        String,
        /// This argument shall contain the value of the `Health` property for the relevant Redfish resource.  The values shall be used from the definition of the `Health` enumeration in the `Resource` schema.
        String,
    ),
    /// This message shall be used to indicate that the value of the PowerState property of a resource has changed to `Off`.
    #[message(message = "The resource `%1` has powered off.")]
    #[message(id = "ResourceEvent.1.3.0.ResourcePoweredOff")]
    #[message(severity = "crate::models::resource::Health::OK")]
    #[message(resolution = "None.")]
    ResourcePoweredOff(
        /// This argument shall contain the name of the relevant Redfish resource.
        String,
    ),
    /// This message shall be used to indicate that the value of the State property of a resource has changed.
    #[message(message = "The state of resource `%1` has changed to %2.")]
    #[message(id = "ResourceEvent.1.3.0.ResourceStateChanged")]
    #[message(severity = "crate::models::resource::Health::OK")]
    #[message(resolution = "None.")]
    ResourceStateChanged(
        /// This argument shall contain the name of the relevant Redfish resource.
        String,
        /// This argument shall contain the value of the `State` property for the relevant Redfish resource.  The values shall be used from the definition of the `State` enumeration in the `Resource` schema.
        String,
    ),
    /// This message shall be used to indicate that an incompatible version of software has been detected.
    #[message(message = "An incompatible version of software '%1' has been detected.")]
    #[message(id = "ResourceEvent.1.3.0.ResourceVersionIncompatible")]
    #[message(severity = "crate::models::resource::Health::Warning")]
    #[message(resolution = "Compare the version of the resource with the compatible version of the software.")]
    ResourceVersionIncompatible(
        /// This argument shall contain the name of the relevant software component or package.  This might include both name and version information.
        String,
    ),
    /// This message shall be used to indicate that one or more resource properties have changed.
    #[message(message = "One or more resource properties have changed.")]
    #[message(id = "ResourceEvent.1.3.0.ResourceChanged")]
    #[message(severity = "crate::models::resource::Health::OK")]
    #[message(resolution = "None.")]
    ResourceChanged,

    /// This message shall be used to indicate that a license has expired.
    #[message(message = "A license for '%1' has expired.  The following message was returned: '%2'.")]
    #[message(id = "ResourceEvent.1.3.0.LicenseExpired")]
    #[message(severity = "crate::models::resource::Health::Warning")]
    #[message(resolution = "See vendor specific instructions for specific actions.")]
    LicenseExpired(
        /// This argument shall contain the name of the relevant resource or service affected by the software license.
        String,
        /// This argument shall contain the message returned from the license validation process or software.
        String,
    ),
    /// This message shall be used to indicate a test of a event delivery mechanism, such as the creation of a LogEntry resource or an event transmission.
    #[message(message = "Test message.")]
    #[message(id = "ResourceEvent.1.3.0.TestMessage")]
    #[message(severity = "crate::models::resource::Health::OK")]
    #[message(resolution = "None.")]
    TestMessage,

    /// This message shall be used to indicate that a specified resource property has exceeded its error threshold.
    #[message(message = "The resource property %1 has exceeded error threshold of value %2.")]
    #[message(id = "ResourceEvent.1.3.0.ResourceErrorThresholdExceeded")]
    #[message(severity = "crate::models::resource::Health::Critical")]
    #[message(resolution = "None.")]
    ResourceErrorThresholdExceeded(
        /// This argument shall contain the name of the relevant property from a Redfish resource.
        String,
        /// This argument shall contain the value of the relevant error threshold.
        f64,
    ),
    /// This message shall be used to indicate that a specified resource property has corrected errors.
    #[message(message = "The resource property %1 has corrected errors of type '%2'.")]
    #[message(id = "ResourceEvent.1.3.0.ResourceErrorsCorrected")]
    #[message(severity = "crate::models::resource::Health::OK")]
    #[message(resolution = "None.")]
    ResourceErrorsCorrected(
        /// This argument shall contain the name of the relevant property from a Redfish resource.
        String,
        /// This argument shall contain a description of the type of error encountered.
        String,
    ),
    /// This message shall be used to indicate that a self-test has completed.
    #[message(message = "A self-test has completed.")]
    #[message(id = "ResourceEvent.1.3.0.ResourceSelfTestCompleted")]
    #[message(severity = "crate::models::resource::Health::OK")]
    #[message(resolution = "None.")]
    ResourceSelfTestCompleted,

    /// This message shall be used to indicate that a specified resource property has detected errors.
    #[message(message = "The resource property %1 has detected errors of type '%2'.")]
    #[message(id = "ResourceEvent.1.3.0.ResourceErrorsDetected")]
    #[message(severity = "crate::models::resource::Health::Warning")]
    #[message(resolution = "Resolution dependent upon error type.")]
    ResourceErrorsDetected(
        /// This argument shall contain the name of the relevant property from a Redfish resource.
        String,
        /// This argument shall contain a description of the type of error encountered.
        String,
    ),
    /// This message shall be used to indicate that a specified resource property has cleared its warning threshold.
    #[message(message = "The resource property %1 has cleared the warning threshold of value %2.")]
    #[message(id = "ResourceEvent.1.3.0.ResourceWarningThresholdCleared")]
    #[message(severity = "crate::models::resource::Health::OK")]
    #[message(resolution = "None.")]
    ResourceWarningThresholdCleared(
        /// This argument shall contain the name of the relevant property from a Redfish resource.
        String,
        /// This argument shall contain the value of the relevant error threshold.
        f64,
    ),
    /// This message shall be used to indicates that all conditions of a successful creation operation have been met.
    #[message(message = "The resource has been created successfully.")]
    #[message(id = "ResourceEvent.1.3.0.ResourceCreated")]
    #[message(severity = "crate::models::resource::Health::OK")]
    #[message(resolution = "None")]
    ResourceCreated,

    /// This message shall be used to indicate that a license has been added.
    #[message(message = "A license for '%1' has been added.  The following message was returned: '%2'.")]
    #[message(id = "ResourceEvent.1.3.0.LicenseAdded")]
    #[message(severity = "crate::models::resource::Health::OK")]
    #[message(resolution = "See vendor specific instructions for specific actions.")]
    LicenseAdded(
        /// This argument shall contain the name of the relevant resource or service affected by the software license.
        String,
        /// This argument shall contain the message returned from the license validation process or software.
        String,
    ),
    /// This message shall be used to indicate that the health of a resource has changed to OK.
    #[message(message = "The health of resource '%1' has changed to %2.")]
    #[message(id = "ResourceEvent.1.3.0.ResourceStatusChangedOK")]
    #[message(severity = "crate::models::resource::Health::OK")]
    #[message(resolution = "None.")]
    ResourceStatusChangedOK(
        /// This argument shall contain the name of the relevant Redfish resource.
        String,
        /// This argument shall contain the value of the `Health` property for the relevant Redfish resource.  The values shall be used from the definition of the `Health` enumeration in the `Resource` schema.
        String,
    ),
    /// This message shall be used to indicate that the value of the PowerState property of a resource has changed to `On`.
    #[message(message = "The resource `%1` has powered on.")]
    #[message(id = "ResourceEvent.1.3.0.ResourcePoweredOn")]
    #[message(severity = "crate::models::resource::Health::OK")]
    #[message(resolution = "None.")]
    ResourcePoweredOn(
        /// This argument shall contain the name of the relevant Redfish resource.
        String,
    ),
    /// This message shall be used to indicates that all conditions of a successful remove operation have been met.
    #[message(message = "The resource has been removed successfully.")]
    #[message(id = "ResourceEvent.1.3.0.ResourceRemoved")]
    #[message(severity = "crate::models::resource::Health::OK")]
    #[message(resolution = "None")]
    ResourceRemoved,

    /// This message shall be used to indicate that a self-test has failed.
    #[message(message = "A self-test has failed.  The following message was returned: '%1'.")]
    #[message(id = "ResourceEvent.1.3.0.ResourceSelfTestFailed")]
    #[message(severity = "crate::models::resource::Health::Critical")]
    #[message(resolution = "See vendor specific instructions for specific actions.")]
    ResourceSelfTestFailed(
        /// This argument shall contain the error message received as a result from the self-test.
        String,
    ),
    /// This message shall be used to indicate that a specified resource property has exceeded its warning threshold.
    #[message(message = "The resource property %1 has exceeded its warning threshold of value %2.")]
    #[message(id = "ResourceEvent.1.3.0.ResourceWarningThresholdExceeded")]
    #[message(severity = "crate::models::resource::Health::Warning")]
    #[message(resolution = "None.")]
    ResourceWarningThresholdExceeded(
        /// This argument shall contain the name of the relevant property from a Redfish resource.
        String,
        /// This argument shall contain the value of the relevant error threshold.
        f64,
    ),
    /// This message shall be used to indicate that a license has changed.
    #[message(message = "A license for '%1' has changed.  The following message was returned: '%2'.")]
    #[message(id = "ResourceEvent.1.3.0.LicenseChanged")]
    #[message(severity = "crate::models::resource::Health::Warning")]
    #[message(resolution = "See vendor specific instructions for specific actions.")]
    LicenseChanged(
        /// This argument shall contain the name of the relevant resource or service affected by the software license.
        String,
        /// This argument shall contain the message returned from the license validation process or software.
        String,
    ),
    /// This message shall be used to indicate that the value of the PowerState property of a resource has changed to `PoweringOn`.  This message should not be used if the PowerState transition to `On` will occur immediately.
    #[message(message = "The resource `%1` is powering on.")]
    #[message(id = "ResourceEvent.1.3.0.ResourcePoweringOn")]
    #[message(severity = "crate::models::resource::Health::OK")]
    #[message(resolution = "None.")]
    ResourcePoweringOn(
        /// This argument shall contain the name of the relevant Redfish resource.
        String,
    ),
    /// This message shall be used to indicate an aggregation source has been discovered in the network or host.  The `OriginOfCondition` property shall contain a link to the matching `ConnectionMethod` resource if known.
    #[message(message = "A aggregation source of connection method `%1` located at `%2` has been discovered.")]
    #[message(id = "ResourceEvent.1.3.0.AggregationSourceDiscovered")]
    #[message(severity = "crate::models::resource::Health::OK")]
    #[message(resolution = "The aggregation source is available to the service and can be identified using the identified connection method.")]
    AggregationSourceDiscovered(
        /// This argument shall contain a value from the `ConnectionMethodType` enumeration defined in the `ConnectionMethod` schema that describes connection method of the discovered aggregation source.
        String,
        /// This argument shall contain the location of the discovered aggregation source, such as an IP address or service entry point.
        String,
    ),
}