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 links to other resources that are related to this resource.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct Links {
    #[serde(rename = "ActiveSoftwareImage")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub active_software_image: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Chassis")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub chassis: Option<models::odata_v4::IdRef>,
    /// An array of links to the endpoints that connect to this drive.
    #[serde(rename = "Endpoints")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub endpoints: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "Endpoints@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub endpoints_odata_count: Option<models::odata_v4::Count>,
    /// An array of links to the network device functions that provide network connectivity for this drive.
    #[serde(rename = "NetworkDeviceFunctions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub network_device_functions: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "NetworkDeviceFunctions@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub network_device_functions_odata_count: Option<models::odata_v4::Count>,
    #[serde(rename = "Oem")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub oem: Option<models::resource::Oem>,
    /// An array of links to the PCIe functions that the drive produces.
    #[serde(rename = "PCIeFunctions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub pcie_functions: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "PCIeFunctions@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub pcie_functions_odata_count: Option<models::odata_v4::Count>,
    /// The images that are associated with this drive.
    #[serde(rename = "SoftwareImages")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub software_images: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "SoftwareImages@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub software_images_odata_count: Option<models::odata_v4::Count>,
    #[serde(rename = "Storage")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub storage: Option<models::odata_v4::IdRef>,
    /// An array of links to the storage pools to which this drive belongs.
    #[serde(rename = "StoragePools")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub storage_pools: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "StoragePools@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub storage_pools_odata_count: Option<models::odata_v4::Count>,
    /// An array of links to the volumes that this drive either wholly or only partially contains.
    #[serde(rename = "Volumes")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub volumes: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "Volumes@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub volumes_odata_count: Option<models::odata_v4::Count>,
}

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