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 Processor schema describes the information about a single processor that a system contains.  A processor includes both performance characteristics, clock speed, architecture, core count, and so on, and compatibility, such as the CPU ID instruction results.  It also describes the location, such as a slot, socket, or bay, where a unit can be installed, by populating a resource instance with an absent state if a unit is not present.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct Processor {
    #[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(\"#Processor.v1_18_0.Processor\".to_string())"))]
    pub odata_type: models::odata_v4::Type,
    #[serde(rename = "AccelerationFunctions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub acceleration_functions: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Actions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub actions: Option<models::processor::v1_18_0::Actions>,
    #[serde(rename = "AdditionalFirmwareVersions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub additional_firmware_versions: Option<models::software_inventory::AdditionalVersions>,
    #[serde(rename = "AppliedOperatingConfig")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub applied_operating_config: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Assembly")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub assembly: Option<models::odata_v4::IdRef>,
    /// 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>,
    #[serde(rename = "BaseSpeedPriorityState")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub base_speed_priority_state: Option<models::processor::v1_18_0::BaseSpeedPriorityState>,
    #[serde(rename = "Certificates")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub certificates: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Description")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<models::resource::Description>,
    /// An indication of whether this processor is enabled.
    #[serde(rename = "Enabled")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    #[serde(rename = "EnvironmentMetrics")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub environment_metrics: Option<models::odata_v4::IdRef>,
    #[serde(rename = "FPGA")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub fpga: Option<models::processor::v1_18_0::FPGA>,
    /// The processor family.
    #[serde(rename = "Family")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub family: Option<String>,
    /// The firmware version of the processor.
    #[serde(rename = "FirmwareVersion")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub firmware_version: Option<String>,
    /// The list of core identifiers corresponding to the cores that have been configured with the higher clock speed from the operating configuration applied to this processor.
    #[serde(rename = "HighSpeedCoreIDs")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub high_speed_core_i_ds: Option<Vec<i64>>,
    #[serde(rename = "Id")]
    #[serde(skip_deserializing)]
    pub id: models::resource::Id,
    #[serde(rename = "InstructionSet")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub instruction_set: Option<models::processor::v1_18_0::InstructionSet>,
    #[serde(rename = "Links")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub links: Option<models::processor::v1_18_0::Links>,
    #[serde(rename = "Location")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub location: Option<models::resource::Location>,
    /// An indicator allowing an operator to physically locate this resource.
    #[serde(rename = "LocationIndicatorActive")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub location_indicator_active: Option<bool>,
    /// The processor manufacturer.
    #[serde(rename = "Manufacturer")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub manufacturer: Option<String>,
    /// The maximum clock speed of the processor.
    #[serde(rename = "MaxSpeedMHz")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub max_speed_m_hz: Option<i64>,
    /// The maximum Thermal Design Power (TDP) in watts.
    #[serde(rename = "MaxTDPWatts")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub max_tdp_watts: Option<i64>,
    /// An array of DSP0274-defined measurement blocks.
    #[serde(rename = "Measurements")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub measurements: Option<Vec<models::software_inventory::MeasurementBlock>>,
    #[serde(rename = "MemorySummary")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub memory_summary: Option<models::processor::v1_18_0::MemorySummary>,
    #[serde(rename = "Metrics")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub metrics: Option<models::odata_v4::IdRef>,
    /// The minimum clock speed of the processor in MHz.
    #[serde(rename = "MinSpeedMHz")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub min_speed_m_hz: Option<i64>,
    /// The product model number of this device.
    #[serde(rename = "Model")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub model: Option<String>,
    #[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>,
    #[serde(rename = "OperatingConfigs")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub operating_configs: Option<models::odata_v4::IdRef>,
    /// Operating speed of the processor in MHz.
    #[serde(rename = "OperatingSpeedMHz")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub operating_speed_m_hz: Option<i64>,
    #[serde(rename = "OperatingSpeedRangeMHz")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub operating_speed_range_m_hz: Option<models::control::ControlRangeExcerpt>,
    /// The part number of the processor.
    #[serde(rename = "PartNumber")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub part_number: Option<String>,
    #[serde(rename = "Ports")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub ports: Option<models::odata_v4::IdRef>,
    #[serde(rename = "PowerState")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub power_state: Option<models::resource::PowerState>,
    #[serde(rename = "ProcessorArchitecture")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub processor_architecture: Option<models::processor::v1_18_0::ProcessorArchitecture>,
    #[serde(rename = "ProcessorId")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub processor_id: Option<models::processor::v1_18_0::ProcessorId>,
    /// The logical index of this processor within the system.
    #[serde(rename = "ProcessorIndex")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub processor_index: Option<i64>,
    /// The memory directly attached or integrated within this processor.  Examples include internal cache, dedicated memory for the processor, and system memory.
    #[serde(rename = "ProcessorMemory")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub processor_memory: Option<Vec<models::processor::v1_18_0::ProcessorMemory>>,
    #[serde(rename = "ProcessorType")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub processor_type: Option<models::processor::v1_18_0::ProcessorType>,
    /// An indication of whether this component can be independently replaced as allowed by the vendor's replacement policy.
    #[serde(rename = "Replaceable")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub replaceable: Option<bool>,
    /// The serial number of the processor.
    #[serde(rename = "SerialNumber")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub serial_number: Option<String>,
    /// The socket or location of the processor.
    #[serde(rename = "Socket")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub socket: Option<String>,
    /// The spare part number of the processor.
    #[serde(rename = "SparePartNumber")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub spare_part_number: Option<String>,
    /// The clock limit of the processor in MHz.
    #[serde(rename = "SpeedLimitMHz")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub speed_limit_m_hz: Option<i64>,
    /// Indicates whether the clock speed of the processor is fixed at the value specified in the SpeedLimitMHz property.
    #[serde(rename = "SpeedLocked")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub speed_locked: Option<bool>,
    #[serde(rename = "Status")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<models::resource::Status>,
    #[serde(rename = "SubProcessors")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub sub_processors: Option<models::odata_v4::IdRef>,
    #[serde(rename = "SystemInterface")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub system_interface: Option<models::processor::v1_18_0::ProcessorInterface>,
    /// The nominal Thermal Design Power (TDP) in watts.
    #[serde(rename = "TDPWatts")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub tdp_watts: Option<i64>,
    /// The causes of the processor being throttled.
    #[serde(rename = "ThrottleCauses")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub throttle_causes: Option<Vec<models::processor::v1_18_0::ThrottleCause>>,
    /// An indication of whether the processor is throttled.
    #[serde(rename = "Throttled")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub throttled: Option<bool>,
    /// The total number of cores that this processor contains.
    #[serde(rename = "TotalCores")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub total_cores: Option<i64>,
    /// The total number of enabled cores that this processor contains.
    #[serde(rename = "TotalEnabledCores")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub total_enabled_cores: Option<i64>,
    /// The total number of execution threads that this processor supports.
    #[serde(rename = "TotalThreads")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub total_threads: Option<i64>,
    #[serde(rename = "TurboState")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub turbo_state: Option<models::processor::v1_18_0::TurboState>,
    #[serde(rename = "UUID")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub uuid: Option<models::resource::UUID>,
    /// The hardware version of the processor.
    #[serde(rename = "Version")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub version: Option<String>,
}

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