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;

/// Memory region information within a memory device.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct RegionSet {
    /// An indication of whether the master passphrase is enabled for this region.
    #[serde(rename = "MasterPassphraseEnabled")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub master_passphrase_enabled: Option<bool>,
    #[serde(rename = "MemoryClassification")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub memory_classification: Option<models::memory::v1_17_1::MemoryClassification>,
    /// Offset within the memory that corresponds to the start of this memory region in mebibytes (MiB).
    #[serde(rename = "OffsetMiB")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub offset_mi_b: Option<i64>,
    /// An indication of whether the passphrase is enabled for this region.
    #[serde(rename = "PassphraseEnabled")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub passphrase_enabled: Option<bool>,
    /// An indication of whether the state of the passphrase for this region is enabled.
    #[serde(rename = "PassphraseState")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub passphrase_state: Option<bool>,
    /// Unique region ID representing a specific region within the memory device.
    #[serde(rename = "RegionId")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub region_id: Option<String>,
    /// Size of this memory region in mebibytes (MiB).
    #[serde(rename = "SizeMiB")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub size_mi_b: Option<i64>,
}

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