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;

/// The common redundancy definition and structure used in other Redfish schemas.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct Redundancy {
    #[serde(rename = "@odata.id")]
    #[serde(skip_deserializing)]
    pub odata_id: models::odata_v4::Id,
    #[serde(rename = "Actions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub actions: Option<models::redundancy::v1_3_6::Actions>,
    /// The maximum number of members allowable for this particular redundancy group.
    #[serde(rename = "MaxNumSupported")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub max_num_supported: Option<i64>,
    /// The identifier for the member within the collection.
    #[serde(rename = "MemberId")]
    pub member_id: String,
    /// The minimum number of members needed for this group to be redundant.
    #[serde(rename = "MinNumNeeded")]
    pub min_num_needed: i64,
    #[serde(rename = "Mode")]
    pub mode: models::redundancy::v1_3_6::RedundancyMode,
    /// The name of the resource or array member.
    #[serde(rename = "Name")]
    pub name: String,
    #[serde(rename = "Oem")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub oem: Option<models::resource::Oem>,
    /// An indication of whether redundancy is enabled.
    #[serde(rename = "RedundancyEnabled")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub redundancy_enabled: Option<bool>,
    /// The links to components of this redundancy set.
    #[serde(rename = "RedundancySet")]
    pub redundancy_set: Vec<models::odata_v4::IdRef>,
    #[serde(rename = "RedundancySet@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub redundancy_set_odata_count: Option<models::odata_v4::Count>,
    #[serde(rename = "Status")]
    pub status: models::resource::Status,
}

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