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;

/// Volume contains properties used to describe a volume, virtual disk, LUN, or other logical storage entity for any system.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct Volume {
    #[serde(rename = "@odata.context")]
    #[serde(skip_deserializing)]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub odata_context: Option<models::odata_v4::Context>,
    #[serde(rename = "@odata.etag")]
    #[serde(skip_deserializing)]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub odata_etag: Option<models::odata_v4::Etag>,
    #[serde(rename = "@odata.id")]
    #[serde(skip_deserializing)]
    pub odata_id: models::odata_v4::Id,
    #[serde(rename = "@odata.type")]
    #[serde(skip_deserializing)]
    #[derivative(Default(value = "models::odata_v4::Type(\"#Volume.v1_8_0.Volume\".to_string())"))]
    pub odata_type: models::odata_v4::Type,
    /// Supported IO access capabilities.
    #[serde(rename = "AccessCapabilities")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub access_capabilities: Option<Vec<models::data_storage_lo_s_capabilities::StorageAccessCapability>>,
    #[serde(rename = "Actions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub actions: Option<models::volume::v1_8_0::Actions>,
    #[serde(rename = "AllocatedPools")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub allocated_pools: Option<models::odata_v4::IdRef>,
    /// The size of the smallest addressable unit (Block) of this volume in bytes.
    #[serde(rename = "BlockSizeBytes")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub block_size_bytes: Option<i64>,
    #[serde(rename = "Capacity")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub capacity: Option<models::capacity::v1_0_0::Capacity>,
    /// The size in bytes of this Volume.
    #[serde(rename = "CapacityBytes")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub capacity_bytes: Option<i64>,
    /// An array of space allocations to this volume.
    #[serde(rename = "CapacitySources")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub capacity_sources: Option<Vec<models::capacity::CapacitySource>>,
    #[serde(rename = "CapacitySources@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub capacity_sources_odata_count: Option<models::odata_v4::Count>,
    /// Indicator of whether or not the Volume has compression enabled.
    #[serde(rename = "Compressed")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub compressed: Option<bool>,
    /// Indicator of whether or not the Volume has deduplication enabled.
    #[serde(rename = "Deduplicated")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub deduplicated: Option<bool>,
    #[serde(rename = "Description")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<models::resource::Description>,
    /// A user-configurable string to name the volume.
    #[serde(rename = "DisplayName")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub display_name: Option<String>,
    /// Is this Volume encrypted.
    #[serde(rename = "Encrypted")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub encrypted: Option<bool>,
    /// The types of encryption used by this Volume.
    #[serde(rename = "EncryptionTypes")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub encryption_types: Option<Vec<models::volume::EncryptionTypes>>,
    /// Indicates the IO performance mode setting for the volume.
    #[serde(rename = "IOPerfModeEnabled")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub io_perf_mode_enabled: Option<bool>,
    #[serde(rename = "IOStatistics")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub io_statistics: Option<models::io_statistics::IOStatistics>,
    #[serde(rename = "Id")]
    #[serde(skip_deserializing)]
    pub id: models::resource::Id,
    /// The Durable names for the volume.
    #[serde(rename = "Identifiers")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub identifiers: Option<Vec<models::resource::Identifier>>,
    #[serde(rename = "InitializeMethod")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub initialize_method: Option<models::volume::InitializeMethod>,
    /// This property indicates whether or not the Volume contains a boot image and is capable of booting.
    #[serde(rename = "IsBootCapable")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub is_boot_capable: Option<bool>,
    #[serde(rename = "Links")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub links: Option<models::volume::v1_8_0::Links>,
    /// Indicates the host-visible LogicalUnitNumber assigned to this Volume.
    #[serde(rename = "LogicalUnitNumber")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub logical_unit_number: Option<i64>,
    /// Low space warning.
    #[serde(rename = "LowSpaceWarningThresholdPercents")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub low_space_warning_threshold_percents: Option<Vec<i64>>,
    /// The manufacturer or OEM of this storage volume.
    #[serde(rename = "Manufacturer")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub manufacturer: Option<String>,
    /// Max Block size in bytes.
    #[serde(rename = "MaxBlockSizeBytes")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub max_block_size_bytes: Option<i64>,
    /// Indicates the number of media elements used per span in the secondary RAID for a hierarchical RAID type.
    #[serde(rename = "MediaSpanCount")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub media_span_count: Option<i64>,
    /// The model number for this storage volume.
    #[serde(rename = "Model")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub model: Option<String>,
    #[serde(rename = "NVMeNamespaceProperties")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub nvme_namespace_properties: Option<models::volume::v1_8_0::NVMeNamespaceProperties>,
    #[serde(rename = "Name")]
    #[serde(skip_deserializing)]
    pub name: models::resource::Name,
    #[serde(rename = "Oem")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub oem: Option<models::resource::Oem>,
    /// The operations currently running on the Volume.
    #[serde(rename = "Operations")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub operations: Option<Vec<models::volume::v1_8_0::Operation>>,
    /// The size in bytes of this Volume's optimum IO size.
    #[serde(rename = "OptimumIOSizeBytes")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub optimum_io_size_bytes: Option<i64>,
    #[serde(rename = "ProvisioningPolicy")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub provisioning_policy: Option<models::data_storage_lo_s_capabilities::ProvisioningPolicy>,
    #[serde(rename = "RAIDType")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub raid_type: Option<models::volume::RAIDType>,
    #[serde(rename = "ReadCachePolicy")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub read_cache_policy: Option<models::volume::ReadCachePolicyType>,
    /// Current number of capacity source resources that are available as replacements.
    #[serde(rename = "RecoverableCapacitySourceCount")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub recoverable_capacity_source_count: Option<i64>,
    /// The percentage of the capacity remaining in the Volume.
    #[serde(rename = "RemainingCapacityPercent")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub remaining_capacity_percent: Option<i64>,
    /// URIs to the resources that are remote target replicas of this source.
    #[serde(rename = "RemoteReplicaTargets")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub remote_replica_targets: Option<Vec<String>>,
    #[serde(rename = "ReplicaInfo")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub replica_info: Option<models::storage_replica_info::v1_4_0::ReplicaInfo>,
    /// The resources that are target replicas of this source.
    #[serde(rename = "ReplicaTargets")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub replica_targets: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "ReplicaTargets@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub replica_targets_odata_count: Option<models::odata_v4::Count>,
    #[serde(rename = "Status")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<models::resource::Status>,
    #[serde(rename = "StorageGroups")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub storage_groups: Option<models::odata_v4::IdRef>,
    /// The number of blocks (bytes) in a strip in a disk array that uses striped data mapping.
    #[serde(rename = "StripSizeBytes")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub strip_size_bytes: Option<i64>,
    #[serde(rename = "VolumeType")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub volume_type: Option<models::volume::VolumeType>,
    #[serde(rename = "VolumeUsage")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub volume_usage: Option<models::volume::VolumeUsageType>,
    #[serde(rename = "WriteCachePolicy")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub write_cache_policy: Option<models::volume::WriteCachePolicyType>,
    #[serde(rename = "WriteCacheState")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub write_cache_state: Option<models::volume::WriteCacheStateType>,
    #[serde(rename = "WriteHoleProtectionPolicy")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub write_hole_protection_policy: Option<models::volume::WriteHoleProtectionPolicyType>,
}

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