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;

/// SPDM policy settings.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct SPDMPolicy {
    /// An indication of whether SPDM extended algorithms are allowed.
    #[serde(rename = "AllowExtendedAlgorithms")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub allow_extended_algorithms: Option<bool>,
    #[serde(rename = "Allowed")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub allowed: Option<models::security_policy::v1_0_0::SPDMParameterSet>,
    #[serde(rename = "Denied")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub denied: Option<models::security_policy::v1_0_0::SPDMParameterSet>,
    /// An indication of whether SPDM communication with devices is enabled.
    #[serde(rename = "Enabled")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    #[serde(rename = "RevokedCertificates")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub revoked_certificates: Option<models::odata_v4::IdRef>,
    /// An indication of whether SPDM secure sessions with devices is enabled.
    #[serde(rename = "SecureSessionEnabled")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub secure_session_enabled: Option<bool>,
    #[serde(rename = "TrustedCertificates")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub trusted_certificates: Option<models::odata_v4::IdRef>,
    /// An indication of whether the manager will verify the certificate of the SPDM endpoint.
    #[serde(rename = "VerifyCertificate")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub verify_certificate: Option<bool>,
}

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