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;

/// DHCPv4 configuration for this interface.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct DHCPv4C {
    /// An indication of whether DHCP v4 is enabled on this Ethernet interface.
    #[serde(rename = "DHCPEnabled")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub dhcp_enabled: Option<bool>,
    #[serde(rename = "FallbackAddress")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub fallback_address: Option<models::ethernet_interface::v1_9_0::DHCPFallback>,
    /// An indication of whether this interface uses DHCP v4-supplied DNS servers.
    #[serde(rename = "UseDNSServers")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub use_dns_servers: Option<bool>,
    /// An indication of whether this interface uses a DHCP v4-supplied domain name.
    #[serde(rename = "UseDomainName")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub use_domain_name: Option<bool>,
    /// An indication of whether this interface uses a DHCP v4-supplied gateway.
    #[serde(rename = "UseGateway")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub use_gateway: Option<bool>,
    /// An indication of whether the interface uses DHCP v4-supplied NTP servers.
    #[serde(rename = "UseNTPServers")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub use_ntp_servers: Option<bool>,
    /// An indication of whether the interface uses DHCP v4-supplied static routes.
    #[serde(rename = "UseStaticRoutes")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub use_static_routes: Option<bool>,
}

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