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 = "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 Ethernet interface.
    #[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>,
    #[serde(rename = "HostInterface")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub host_interface: Option<models::odata_v4::IdRef>,
    #[serde(rename = "NetworkDeviceFunction")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub network_device_function: Option<models::odata_v4::IdRef>,
    /// The link to the network device functions that comprise this Ethernet interface.
    #[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>,
    /// The links to the ports providing this Ethernet interface.
    #[serde(rename = "Ports")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub ports: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "Ports@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub ports_odata_count: Option<models::odata_v4::Count>,
    /// The links to the Ethernet interfaces that comprise this Ethernet interface.
    #[serde(rename = "RelatedInterfaces")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub related_interfaces: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "RelatedInterfaces@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub related_interfaces_odata_count: Option<models::odata_v4::Count>,
}

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