use redfish_macros::IntoRedfishMessage;
#[derive(Clone, Debug, IntoRedfishMessage)]
#[message(crate::models::message::v1_1_2::Message)]
pub enum Composition {
#[message(message = "The composition status of the `ResourceBlock` '%1' has changed.")]
#[message(id = "Composition.1.1.1.ResourceBlockCompositionStateChanged")]
#[message(severity = "crate::models::resource::Health::OK")]
#[message(resolution = "Refresh your cached version of the `ResourceBlock` to get the updated information from the service.")]
ResourceBlockCompositionStateChanged(
String,
),
#[message(message = "Resource block '%1' is not found.")]
#[message(id = "Composition.1.1.1.ResourceBlockNotFound")]
#[message(severity = "crate::models::resource::Health::Critical")]
#[message(resolution = "Remove the resource block and resubmit the request.")]
ResourceBlockNotFound(
String,
),
#[message(message = "Resource block '%1' is not valid.")]
#[message(id = "Composition.1.1.1.ResourceBlockInvalid")]
#[message(severity = "crate::models::resource::Health::Critical")]
#[message(resolution = "Remove the resource block and resubmit the request.")]
ResourceBlockInvalid(
String,
),
#[message(message = "The requested resources are reserved under reservation '%1'.")]
#[message(id = "Composition.1.1.1.ConstrainedResourceAlreadyReserved")]
#[message(severity = "crate::models::resource::Health::Critical")]
#[message(resolution = "Delete the reservation containing the resources and resubmit the request.")]
ConstrainedResourceAlreadyReserved(
String,
),
#[message(message = "The state of the `ResourceBlock` '%1' has changed.")]
#[message(id = "Composition.1.1.1.ResourceBlockStateChanged")]
#[message(severity = "crate::models::resource::Health::OK")]
#[message(resolution = "Refresh your cached version of the `ResourceBlock` to get the updated information from the service.")]
ResourceBlockStateChanged(
String,
),
#[message(message = "Resource block '%1' is already reserved under reservation '%2'.")]
#[message(id = "Composition.1.1.1.SpecifiedResourceAlreadyReserved")]
#[message(severity = "crate::models::resource::Health::Critical")]
#[message(resolution = "Delete the reservation containing the resource block or select a different resource block and resubmit the request.")]
SpecifiedResourceAlreadyReserved(
String,
String,
),
#[message(message = "The provided manifest for the `Compose` action of type %1 contains a stanza with `Id` of value '%2' with a `Content` parameter that could not be processed.")]
#[message(id = "Composition.1.1.1.UnableToProcessStanzaRequest")]
#[message(severity = "crate::models::resource::Health::Critical")]
#[message(resolution = "Add the `Content` parameter to the stanza or remove the stanza, and resubmit the request.")]
UnableToProcessStanzaRequest(
String,
String,
),
#[message(message = "The membership of resource zone '%1' has been changed.")]
#[message(id = "Composition.1.1.1.ResourceZoneMembershipChanged")]
#[message(severity = "crate::models::resource::Health::OK")]
#[message(resolution = "Refresh your cached version of the resource zone to get the updated information from the service.")]
ResourceZoneMembershipChanged(
String,
),
#[message(message = "The `ResourceBlock` with Id '%1' cannot be part of any new compositions.")]
#[message(id = "Composition.1.1.1.ResourceBlockInUse")]
#[message(severity = "crate::models::resource::Health::Warning")]
#[message(resolution = "Remove the `ResourceBlock` from the request and resubmit the request.")]
ResourceBlockInUse(
String,
),
#[message(message = "The requested resources of type '%1' are not available for allocation.")]
#[message(id = "Composition.1.1.1.NoResourceMatch")]
#[message(severity = "crate::models::resource::Health::Critical")]
#[message(resolution = "Change parameters associated with the resource, such as quantity or performance, and resubmit the request.")]
NoResourceMatch(
String,
),
#[message(message = "The provided manifest is empty or a stanza in the manifest contains no request.")]
#[message(id = "Composition.1.1.1.EmptyManifest")]
#[message(severity = "crate::models::resource::Health::Warning")]
#[message(resolution = "Provide a request content for the manifest and resubmit.")]
EmptyManifest,
#[message(message = "The requested resource blocks span multiple resource zones.")]
#[message(id = "Composition.1.1.1.IncompatibleZone")]
#[message(severity = "crate::models::resource::Health::Critical")]
#[message(resolution = "Request resource blocks from the same resource zone.")]
IncompatibleZone,
#[message(message = "The `ResourceBlock` '%1' has changed on the service.")]
#[message(id = "Composition.1.1.1.ResourceBlockChanged")]
#[message(severity = "crate::models::resource::Health::OK")]
#[message(resolution = "Refresh your cached version of the `ResourceBlock` to get the updated information from the service.")]
ResourceBlockChanged(
String,
),
}