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 OperatingConfig schema specifies a configuration that can be used when the processor is operational.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct OperatingConfig {
    #[serde(rename = "@odata.context")]
    #[serde(skip_deserializing)]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub odata_context: Option<models::odata_v4::Context>,
    #[serde(rename = "@odata.etag")]
    #[serde(skip_deserializing)]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub odata_etag: Option<models::odata_v4::Etag>,
    #[serde(rename = "@odata.id")]
    #[serde(skip_deserializing)]
    pub odata_id: models::odata_v4::Id,
    #[serde(rename = "@odata.type")]
    #[serde(skip_deserializing)]
    #[derivative(Default(value = "models::odata_v4::Type(\"#OperatingConfig.v1_0_2.OperatingConfig\".to_string())"))]
    pub odata_type: models::odata_v4::Type,
    #[serde(rename = "Actions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub actions: Option<models::operating_config::v1_0_2::Actions>,
    /// The base (nominal) clock speed of the processor in MHz.
    #[serde(rename = "BaseSpeedMHz")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub base_speed_m_hz: Option<i64>,
    /// The clock speed for sets of cores when the configuration is operational.
    #[serde(rename = "BaseSpeedPrioritySettings")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub base_speed_priority_settings: Option<Vec<models::operating_config::v1_0_2::BaseSpeedPrioritySettings>>,
    #[serde(rename = "Description")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<models::resource::Description>,
    #[serde(rename = "Id")]
    #[serde(skip_deserializing)]
    pub id: models::resource::Id,
    /// The maximum temperature of the junction in degrees Celsius.
    #[serde(rename = "MaxJunctionTemperatureCelsius")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub max_junction_temperature_celsius: Option<i64>,
    /// The maximum clock speed to which the processor can be configured in MHz.
    #[serde(rename = "MaxSpeedMHz")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub max_speed_m_hz: Option<i64>,
    #[serde(rename = "Name")]
    #[serde(skip_deserializing)]
    pub name: models::resource::Name,
    #[serde(rename = "Oem")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub oem: Option<models::resource::Oem>,
    /// The thermal design point of the processor in watts.
    #[serde(rename = "TDPWatts")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub tdp_watts: Option<i64>,
    /// The number of cores in the processor that can be configured.
    #[serde(rename = "TotalAvailableCoreCount")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub total_available_core_count: Option<i64>,
    /// The turbo profiles for the processor.  A turbo profile is the maximum turbo clock speed as a function of the number of active cores.
    #[serde(rename = "TurboProfile")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub turbo_profile: Option<Vec<models::operating_config::v1_0_2::TurboProfileDatapoint>>,
}

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