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 ComponentIntegrity resource provides critical and pertinent security information about a specific device, system, software element, or other managed entity.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct ComponentIntegrity {
    #[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(\"#ComponentIntegrity.v1_2_1.ComponentIntegrity\".to_string())"))]
    pub odata_type: models::odata_v4::Type,
    #[serde(rename = "Actions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub actions: Option<models::component_integrity::v1_2_1::Actions>,
    /// An indication of whether security protocols are enabled for the component.
    #[serde(rename = "ComponentIntegrityEnabled")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub component_integrity_enabled: Option<bool>,
    #[serde(rename = "ComponentIntegrityType")]
    pub component_integrity_type: models::component_integrity::v1_2_1::ComponentIntegrityType,
    /// The version of the security technology.
    #[serde(rename = "ComponentIntegrityTypeVersion")]
    pub component_integrity_type_version: String,
    #[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 date and time when information for the component was last updated.
    #[serde(rename = "LastUpdated")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub last_updated: Option<String>,
    #[serde(rename = "Links")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub links: Option<models::component_integrity::v1_2_1::Links>,
    #[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 = "SPDM")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub spdm: Option<models::component_integrity::v1_2_1::SPDMinfo>,
    #[serde(rename = "Status")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<models::resource::Status>,
    #[serde(rename = "TPM")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub tpm: Option<models::component_integrity::v1_2_1::TPMinfo>,
    /// The link to the the component whose integrity that this resource reports.
    #[serde(rename = "TargetComponentURI")]
    pub target_component_uri: String,
}

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