redfish-codegen 0.3.1

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

use crate::models;

/// An operation currently running on this resource.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct Operations {
    #[serde(rename = "AssociatedTask")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub associated_task: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Operation")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub operation: Option<models::volume::OperationType>,
    /// The name of the operation.
    #[serde(rename = "OperationName")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub operation_name: Option<String>,
    /// The percentage of the operation that has been completed.
    #[serde(rename = "PercentageComplete")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub percentage_complete: Option<i64>,
}

impl crate::Metadata<'static> for Operations {
    const JSON_SCHEMA: &'static str = "Drive.v1_17_0.json";
}