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 criteria used to initiate a transfer for an automatic transfer switch.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct TransferCriteria {
    /// The frequency in hertz over the nominal value that satisfies a criterion for transfer.
    #[serde(rename = "OverNominalFrequencyHz")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub over_nominal_frequency_hz: Option<f64>,
    /// The positive percentage of voltage RMS over the nominal value that satisfies a criterion for transfer.
    #[serde(rename = "OverVoltageRMSPercentage")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub over_voltage_rms_percentage: Option<f64>,
    #[serde(rename = "TransferSensitivity")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub transfer_sensitivity: Option<models::power_distribution::v1_3_1::TransferSensitivityType>,
    /// The frequency in hertz under the nominal value that satisfies a criterion for transfer.
    #[serde(rename = "UnderNominalFrequencyHz")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub under_nominal_frequency_hz: Option<f64>,
    /// The negative percentage of voltage RMS under the nominal value that satisfies a criterion for transfer.
    #[serde(rename = "UnderVoltageRMSPercentage")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub under_voltage_rms_percentage: Option<f64>,
}

impl crate::Metadata<'static> for TransferCriteria {
    const JSON_SCHEMA: &'static str = "PowerDistribution.v1_3_1.json";
}