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 ComputerSystem schema represents a computer or system instance and the software-visible resources, or items within the data plane, such as memory, CPU, and other devices that it can access.  Details of those resources or subsystems are also linked through this resource.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct ComputerSystem {
    #[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(\"#ComputerSystem.v1_20_0.ComputerSystem\".to_string())"))]
    pub odata_type: models::odata_v4::Type,
    #[serde(rename = "Actions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub actions: Option<models::computer_system::v1_20_0::Actions>,
    /// The user-definable tag that can track this computer system for inventory or other client purposes.
    #[serde(rename = "AssetTag")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub asset_tag: Option<String>,
    #[serde(rename = "Bios")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub bios: Option<models::odata_v4::IdRef>,
    /// The version of the system BIOS or primary system firmware.
    #[serde(rename = "BiosVersion")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub bios_version: Option<String>,
    #[serde(rename = "Boot")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub boot: Option<models::computer_system::v1_20_0::Boot>,
    #[serde(rename = "BootProgress")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub boot_progress: Option<models::computer_system::v1_20_0::BootProgress>,
    #[serde(rename = "Certificates")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub certificates: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Composition")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub composition: Option<models::computer_system::v1_20_0::Composition>,
    #[serde(rename = "Description")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<models::resource::Description>,
    #[serde(rename = "EthernetInterfaces")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub ethernet_interfaces: Option<models::odata_v4::IdRef>,
    #[serde(rename = "FabricAdapters")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub fabric_adapters: Option<models::odata_v4::IdRef>,
    #[serde(rename = "GraphicalConsole")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub graphical_console: Option<models::computer_system::v1_20_0::HostGraphicalConsole>,
    #[serde(rename = "GraphicsControllers")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub graphics_controllers: Option<models::odata_v4::IdRef>,
    /// The DNS host name, without any domain information.
    #[serde(rename = "HostName")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub host_name: Option<String>,
    #[serde(rename = "HostWatchdogTimer")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub host_watchdog_timer: Option<models::computer_system::v1_20_0::WatchdogTimer>,
    #[serde(rename = "HostedServices")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub hosted_services: Option<models::computer_system::v1_20_0::HostedServices>,
    /// The hosting roles that this computer system supports.
    #[serde(rename = "HostingRoles")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub hosting_roles: Option<Vec<models::computer_system::v1_20_0::HostingRole>>,
    #[serde(rename = "Id")]
    #[serde(skip_deserializing)]
    pub id: models::resource::Id,
    #[serde(rename = "IdlePowerSaver")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub idle_power_saver: Option<models::computer_system::v1_20_0::IdlePowerSaver>,
    #[serde(rename = "IndicatorLED")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub indicator_led: Option<models::computer_system::v1_20_0::IndicatorLED>,
    #[serde(rename = "KeyManagement")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub key_management: Option<models::computer_system::v1_20_0::KeyManagement>,
    /// The date and time when the system was last reset or rebooted.
    #[serde(rename = "LastResetTime")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub last_reset_time: Option<String>,
    #[serde(rename = "Links")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub links: Option<models::computer_system::v1_20_0::Links>,
    /// 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>,
    #[serde(rename = "LogServices")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub log_services: Option<models::odata_v4::IdRef>,
    /// The manufacturer or OEM of this system.
    #[serde(rename = "Manufacturer")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub manufacturer: Option<String>,
    /// An indication of whether the system is in manufacturing mode.  Manufacturing mode is a special boot mode, not normally available to end users, that modifies features and settings for use while the system is being manufactured and tested.
    #[serde(rename = "ManufacturingMode")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub manufacturing_mode: Option<bool>,
    /// 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 = "Memory")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub memory: Option<models::odata_v4::IdRef>,
    #[serde(rename = "MemoryDomains")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub memory_domains: Option<models::odata_v4::IdRef>,
    #[serde(rename = "MemorySummary")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub memory_summary: Option<models::computer_system::v1_20_0::MemorySummary>,
    /// The product name for this system, without the manufacturer name.
    #[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 = "NetworkInterfaces")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub network_interfaces: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Oem")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub oem: Option<models::resource::Oem>,
    /// The link to a collection of PCIe devices that this computer system uses.
    #[serde(rename = "PCIeDevices")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub pcie_devices: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "PCIeDevices@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub pcie_devices_odata_count: Option<models::odata_v4::Count>,
    /// The link to a collection of PCIe functions that this computer system uses.
    #[serde(rename = "PCIeFunctions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub pcie_functions: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "PCIeFunctions@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub pcie_functions_odata_count: Option<models::odata_v4::Count>,
    /// The part number for this system.
    #[serde(rename = "PartNumber")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub part_number: Option<String>,
    /// The number of seconds to delay power on after a `Reset` action requesting `PowerCycle`.  Zero seconds indicates no delay.
    #[serde(rename = "PowerCycleDelaySeconds")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub power_cycle_delay_seconds: Option<f64>,
    #[serde(rename = "PowerMode")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub power_mode: Option<models::computer_system::v1_20_0::PowerMode>,
    /// The number of seconds to delay power off during a reset.  Zero seconds indicates no delay to power off.
    #[serde(rename = "PowerOffDelaySeconds")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub power_off_delay_seconds: Option<f64>,
    /// The number of seconds to delay power on after a power cycle or during a reset.  Zero seconds indicates no delay to power up.
    #[serde(rename = "PowerOnDelaySeconds")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub power_on_delay_seconds: Option<f64>,
    #[serde(rename = "PowerRestorePolicy")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub power_restore_policy: Option<models::computer_system::v1_20_0::PowerRestorePolicyTypes>,
    #[serde(rename = "PowerState")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub power_state: Option<models::resource::PowerState>,
    #[serde(rename = "ProcessorSummary")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub processor_summary: Option<models::computer_system::v1_20_0::ProcessorSummary>,
    #[serde(rename = "Processors")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub processors: Option<models::odata_v4::IdRef>,
    /// The link to a collection of redundancy entities.  Each entity specifies a kind and level of redundancy and a collection, or redundancy set, of other computer systems that provide the specified redundancy to this computer system.
    #[serde(rename = "Redundancy")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub redundancy: Option<Vec<models::redundancy::Redundancy>>,
    #[serde(rename = "Redundancy@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub redundancy_odata_count: Option<models::odata_v4::Count>,
    /// The manufacturer SKU for this system.
    #[serde(rename = "SKU")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub sku: Option<String>,
    #[serde(rename = "SecureBoot")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub secure_boot: Option<models::odata_v4::IdRef>,
    #[serde(rename = "SerialConsole")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub serial_console: Option<models::computer_system::v1_20_0::HostSerialConsole>,
    /// The serial number for this system.
    #[serde(rename = "SerialNumber")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub serial_number: Option<String>,
    #[serde(rename = "SimpleStorage")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub simple_storage: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Status")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<models::resource::Status>,
    #[serde(rename = "Storage")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub storage: Option<models::odata_v4::IdRef>,
    /// The sub-model for this system.
    #[serde(rename = "SubModel")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub sub_model: Option<String>,
    #[serde(rename = "SystemType")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub system_type: Option<models::computer_system::v1_20_0::SystemType>,
    /// An array of trusted modules in the system.
    #[serde(rename = "TrustedModules")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub trusted_modules: Option<Vec<models::computer_system::v1_20_0::TrustedModules>>,
    #[serde(rename = "USBControllers")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub usb_controllers: Option<models::odata_v4::IdRef>,
    #[serde(rename = "UUID")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub uuid: Option<models::resource::UUID>,
    #[serde(rename = "VirtualMedia")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub virtual_media: Option<models::odata_v4::IdRef>,
    #[serde(rename = "VirtualMediaConfig")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub virtual_media_config: Option<models::computer_system::v1_20_0::VirtualMediaConfig>,
}

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