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 address pools associated with this endpoint.
    #[serde(rename = "AddressPools")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub address_pools: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "AddressPools@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub address_pools_odata_count: Option<models::odata_v4::Count>,
    /// An array of links to the switch ports or 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>,
    /// The connections to which this endpoint belongs.
    #[serde(rename = "Connections")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub connections: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "Connections@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub connections_odata_count: Option<models::odata_v4::Count>,
    /// An array of links to the device ports that this endpoint represents.
    #[serde(rename = "LocalPorts")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub local_ports: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "LocalPorts@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub local_ports_odata_count: Option<models::odata_v4::Count>,
    /// An array of links to the endpoints that cannot be used in zones if this endpoint is in a zone.
    #[serde(rename = "MutuallyExclusiveEndpoints")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub mutually_exclusive_endpoints: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "MutuallyExclusiveEndpoints@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub mutually_exclusive_endpoints_odata_count: Option<models::odata_v4::Count>,
    /// When NetworkDeviceFunction resources are present, this array contains links to the network device functions that connect to this endpoint.
    #[serde(rename = "NetworkDeviceFunction")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub network_device_function: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "NetworkDeviceFunction@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub network_device_function_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 physical ports associated with this endpoint.
    #[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 zones to which this endpoint belongs.
    #[serde(rename = "Zones")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub zones: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "Zones@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub zones_odata_count: Option<models::odata_v4::Count>,
}

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