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 ResourceBlock schema contains definitions resource blocks, its components, and affinity to composed devices.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct ResourceBlock {
    #[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(\"#ResourceBlock.v1_4_0.ResourceBlock\".to_string())"))]
    pub odata_type: models::odata_v4::Type,
    #[serde(rename = "Actions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub actions: Option<models::resource_block::v1_4_0::Actions>,
    /// The client to which this resource block is assigned.
    #[serde(rename = "Client")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub client: Option<String>,
    #[serde(rename = "CompositionStatus")]
    pub composition_status: models::resource_block::v1_4_0::CompositionStatus,
    /// An array of links to the computer systems available in this resource block.
    #[serde(rename = "ComputerSystems")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub computer_systems: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "ComputerSystems@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub computer_systems_odata_count: Option<models::odata_v4::Count>,
    #[serde(rename = "Description")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<models::resource::Description>,
    /// An array of links to the drives available in this resource block.
    #[serde(rename = "Drives")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub drives: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "Drives@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub drives_odata_count: Option<models::odata_v4::Count>,
    /// An array of links to the Ethernet interfaces available in this resource block.
    #[serde(rename = "EthernetInterfaces")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub ethernet_interfaces: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "EthernetInterfaces@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub ethernet_interfaces_odata_count: Option<models::odata_v4::Count>,
    #[serde(rename = "Id")]
    #[serde(skip_deserializing)]
    pub id: models::resource::Id,
    #[serde(rename = "Links")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub links: Option<models::resource_block::v1_4_0::Links>,
    /// An array of links to the memory available in this resource block.
    #[serde(rename = "Memory")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub memory: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "Memory@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub memory_odata_count: Option<models::odata_v4::Count>,
    #[serde(rename = "Name")]
    #[serde(skip_deserializing)]
    pub name: models::resource::Name,
    /// An array of links to the Network Interfaces available in this resource block.
    #[serde(rename = "NetworkInterfaces")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub network_interfaces: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "NetworkInterfaces@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub network_interfaces_odata_count: Option<models::odata_v4::Count>,
    #[serde(rename = "Oem")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub oem: Option<models::resource::Oem>,
    #[serde(rename = "Pool")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub pool: Option<models::resource_block::v1_4_0::PoolType>,
    /// An array of links to the processors available in this resource block.
    #[serde(rename = "Processors")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub processors: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "Processors@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub processors_odata_count: Option<models::odata_v4::Count>,
    /// The types of resources available on this resource block.
    #[serde(rename = "ResourceBlockType")]
    pub resource_block_type: Vec<models::resource_block::v1_4_0::ResourceBlockType>,
    /// An array of links to the simple storage available in this resource block.
    #[serde(rename = "SimpleStorage")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub simple_storage: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "SimpleStorage@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub simple_storage_odata_count: Option<models::odata_v4::Count>,
    #[serde(rename = "Status")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<models::resource::Status>,
    /// An array of links to the storage available in this resource block.
    #[serde(rename = "Storage")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub storage: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "Storage@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub storage_odata_count: Option<models::odata_v4::Count>,
}

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