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;

/// This contains properties to use when Volume is used to describe an NVMe Namespace.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct NVMeNamespaceProperties {
    /// The LBA data size and metadata size combination that the namespace has been formatted with.
    #[serde(rename = "FormattedLBASize")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub formatted_lba_size: Option<String>,
    /// Indicates the namespace is shareable.
    #[serde(rename = "IsShareable")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub is_shareable: Option<bool>,
    #[serde(rename = "LBAFormat")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub lba_format: Option<models::volume::v1_9_0::LBAFormat>,
    /// Describes the LBA format IDs and detailed properties.
    #[serde(rename = "LBAFormats")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub lba_formats: Option<Vec<models::volume::v1_9_0::LBAFormat>>,
    /// A list of the LBA format types supported for the namespace, or potential namespaces.
    #[serde(rename = "LBAFormatsSupported")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub lba_formats_supported: Option<Vec<models::volume::LBAFormatType>>,
    /// This property indicates whether or not the metadata is transferred at the end of the LBA creating an extended data LBA.
    #[serde(rename = "MetadataTransferredAtEndOfDataLBA")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub metadata_transferred_at_end_of_data_lba: Option<bool>,
    /// The version of the NVMe Base Specification supported.
    #[serde(rename = "NVMeVersion")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub nvme_version: Option<String>,
    #[serde(rename = "NamespaceFeatures")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub namespace_features: Option<models::volume::v1_9_0::NamespaceFeatures>,
    /// The NVMe Namespace Identifier for this namespace.
    #[serde(rename = "NamespaceId")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub namespace_id: Option<String>,
    #[serde(rename = "NamespaceType")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub namespace_type: Option<models::volume::NamespaceType>,
    /// The number of LBA data size and metadata size combinations supported by this namespace. The value of this property is between 0 and 16.
    #[serde(rename = "NumberLBAFormats")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub number_lba_formats: Option<i64>,
    #[serde(rename = "Type")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub r#type: Option<models::volume::NamespaceType>,
}

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