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 {
    /// An array of links to the endpoints at the other end of the link.
    #[serde(rename = "AssociatedEndpoints")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub associated_endpoints: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "AssociatedEndpoints@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub associated_endpoints_odata_count: Option<models::odata_v4::Count>,
    /// An array of links to the cables connected to this port.
    #[serde(rename = "Cables")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub cables: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "Cables@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub cables_odata_count: Option<models::odata_v4::Count>,
    /// An array of links to the remote device ports at the other end of the link.
    #[serde(rename = "ConnectedPorts")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub connected_ports: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "ConnectedPorts@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub connected_ports_odata_count: Option<models::odata_v4::Count>,
    /// An array of links to the switch ports at the other end of the link.
    #[serde(rename = "ConnectedSwitchPorts")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub connected_switch_ports: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "ConnectedSwitchPorts@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub connected_switch_ports_odata_count: Option<models::odata_v4::Count>,
    /// An array of links to the switches at the other end of the link.
    #[serde(rename = "ConnectedSwitches")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub connected_switches: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "ConnectedSwitches@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub connected_switches_odata_count: Option<models::odata_v4::Count>,
    /// The links to the Ethernet interfaces this port provides.
    #[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 = "Oem")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub oem: Option<models::resource::Oem>,
}

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